xxxxxxxxxx
+---+--------------------------+----------------------------------+-----------+
| 1 | Sign up date | no_stores | no_unin_app no_stores_recei | ed_order |
+---+--------------------------+----------------------------------+-----------+
| 2 | 2020-04-01 | 1 | 0 | 0 |
| 3 | 2020-04-04 | 11 | 3 | 6 |
| 4 | 2020-04-13 | 8 | 1 | 4 |
+---+--------------------------+----------------------------------+-----------+
xxxxxxxxxx
df.drop(df.index[df['myvar'] == 'specific_name'], inplace = True)
xxxxxxxxxx
#to drop rows based on certain condition in a column
import pandas as pd
df = df[df['column']!=1]
xxxxxxxxxx
def filter_rows_by_values(df, col, values):
return df[~df[col].isin(values)]