drop colums pandas code example
Example 1: removing features pandas
df.drop([‘feature_1’,’feature_2’], inplace = True, axis = 1)
Example 2: drop variable pandas
# pandas drop a column with drop function
gapminder_ocean.drop(['pop'], axis=1)
df.drop([‘feature_1’,’feature_2’], inplace = True, axis = 1)
# pandas drop a column with drop function
gapminder_ocean.drop(['pop'], axis=1)