in3Utils.cfgUtils.renameDuplicates

renameDuplicates(df)[source]

Rename duplicate column names in the given DataFrame. This ensures all column names in the DataFrame are unique by adding a suffix ‘DuplX’ where X is the occurrence number, starting from 1 for the first duplicate.

Parameters

df (pandas.DataFrame) – The input DataFrame whose column names need to be checked for duplicates.

Returns

Returns True to indicate the renaming of duplicate column names was successful.

Return type

bool