how to drop the index pandas code example
Example 1: dataframe delete row
df.drop(df.index[2])
Example 2: drop variable pandas
# pandas drop a column with drop function
gapminder_ocean.drop(['pop'], axis=1)
df.drop(df.index[2])
# pandas drop a column with drop function
gapminder_ocean.drop(['pop'], axis=1)