removing rows from a dataframe code example
Example 1: delete a row in pandas dataframe
df.drop(df.index[2])
Example 2: is coumn exist then delete in datafrmae
if 'A' in df.columns:
del df['A']
Example 3: remove rows from dataframe
df.drop(['Cochice', 'Pima'])