Given a CSV file with duplicate column A, I need to read the file excluding the duplicate column -
A A C
306 306 506
3238 3238 591
4159 4159 366
1847 1847 2898
Available alternative options include usecols, and names. However, in Pandas version 0.24.1 we have mangle_dupe_cols parameter too, which if set to False should merge duplicate columns as mentioned in the docs.
But, when I do so, I get ValueError-
pd.read_csv('file.csv', mangle_dupe_cols=False, engine='python').head()
ValueError: Setting mangle_dupe_cols=False is not supported yet
Pandas version used for this problem - 0.24.1
What are your views on this problem?
df = df.loc[:,~df.columns.duplicated()]while reading. I am well aware of the fact that there are various ways to remove duplicate after reading. I hope you get what I'm trying to ask.AA.1C?mangle_dupe_cols != True". It sounds like your problem does not have a solution.