Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python - remove columns with same name and keep first
Ankit Sharma
Programming language:
Python
2021-07-08 17:40:26
0
Q:
python - remove columns with same name and keep first
Snezzy
Code:
Python
2021-06-12 11:36:14
df1 = df.loc[:, ~df.columns.duplicated()]
0
Tags
name
python
remove
columns
first
Related
openpyxl delete column by name
remove 1st column pandas
remove all rows without a value pandas
python - subset specific columns name in a dataframe
python - show repeted values in a column
python - count number of values without dupicalte in a second column values
pandas dataframe remove rows by column value
remove row if all are the same value pandas
python - remove repeted columns in a df
python pandas return column name of a specific column
remove all of same value python list
get rid of unnamed column pandas
extract first letter of column python
extract first word from string in column into a list in python
how to get only one column from dataset in python
pandas drop all columns except certain ones
python extract values that have different values in a column
New to Communities?
Join the community