python remove columns with same name and keep first

Solutions on MaxInterview for python remove columns with same name and keep first by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "python remove columns with same name and keep first"
Alessandro
05 Jan 2020
1df1 = df.loc[:, ~df.columns.duplicated()]