Answers for "how to delete column in python dataframe"

85

drop a column pandas

df.drop(['column_1', 'Column_2'], axis = 1, inplace = True)
Posted by: Guest on November-08-2020
1

pandas drop column by name

df.drop(columns=['Column_Name1','Column_Name2'], axis=1, inplace=True)
Posted by: Guest on September-15-2021

Code answers related to "how to delete column in python dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language