Answers for "drop columns from data frame pandas"

1

removing features pandas

df.drop([‘feature_1’,’feature_2’], inplace = True, axis = 1)
Posted by: Guest on May-22-2020
1

delete columns pandas

df = df.drop(df.columns[[0, 1, 3]], axis=1)
Posted by: Guest on August-22-2020

Code answers related to "drop columns from data frame pandas"

Python Answers by Framework

Browse Popular Code Answers by Language