pandas remove row from dataframe code example
Example 1: drop columns pandas
df.drop(columns=['B', 'C'])
Example 2: delete a row in pandas dataframe
df.drop(df.index[2])
Example 3: remove rows from dataframe
df.drop(['Cochice', 'Pima'])
Example 4: drop variable pandas
# pandas drop a column with drop function
gapminder_ocean.drop(['pop'], axis=1)