Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to drop duplicate columns in pandas that dont have the same name?

# Drop duplicate columns
df2 = df.T.drop_duplicates().T
print(df2)
Source by sparkbyexamples.com #
 
PREVIOUS NEXT
Tagged: #drop #duplicate #columns #pandas #dont
ADD COMMENT
Topic
Name
1+7 =