vendredi 29 septembre 2017

Pandas Conditional Drop

I'm trying to conditionally drop rows out of a pandas dataframe, using syntax as such:

if ((df['Column_1'] == 'value_1') & (df['Column_2'] == 'value_2')):
    df['Columns_3'] == df['Column_4']
else:
    df.drop()

Thanks in advance for the help.

Aucun commentaire:

Enregistrer un commentaire