private void SetSuffixForDuplicatedColumnNames(DataFrame dataFrame, DataFrameColumn column, string leftSuffix, string rightSuffix) { int index = dataFrame._columnCollection.IndexOf(column.Name); while (index != -1) { // Pre-existing column. Change name DataFrameColumn existingColumn = dataFrame.Columns[index]; dataFrame._columnCollection.SetColumnName(existingColumn, existingColumn.Name + leftSuffix); column.SetName(column.Name + rightSuffix); index = dataFrame._columnCollection.IndexOf(column.Name); } }