basically trying to do some data cleaning in Jupyter Notebook and i am not the best with the syntax so have reached a roadblock. I have a column at the end with mean and if the mean is 0, i would like to delete that row as well as another row which is either above or below that has the same 'Customer' and 'Date' column values.
So far i am trying something across these lines but with little success where both_index is my variable name for the DataFrame
for i in both_index['peak mean']: #this is part of code below
if i == 0:
for j in both_index['peak mean']:
if both_index['Customer'][i] == both_index['Customer'][j]: #this is wrong and i dont know the syntax
both_index.drop(j)
both_index.drop(i)
Any help would be appreciated thank you!