pd remove row where attribute code example
Example 1: delete a row in pandas dataframe
df.drop(df.index[2])
Example 2: df.drop index
df.reset_index(drop=True, inplace=True)
Example 3: remove rows from dataframe
df.drop(['Cochice', 'Pima'])
df.drop(df.index[2])
df.reset_index(drop=True, inplace=True)
df.drop(['Cochice', 'Pima'])