remove column from dataframe

47

drop a column from dataframe -

#To delete the column without having to reassign df
df.drop('column_name', axis=1, inplace=True) 

remove column from dataframe -

df.drop('column_name', axis=1, inplace=True)

df drop column -

df = df.drop(['B', 'C'], axis=1)

Comments

Submit
0 Comments