this is my first post so bear with me... suppose I have this pandas dataframe (this is a sample dataframe I found here How do I use within / in operator in a Pandas DataFrame?) dataframe
ok, now suppose I want to update this dataframe so that I don't have any rows where the month column corresponds to September. Here is the code that I have been using:
df[df.Month != '0']
it seems like its workings, but I get this warning:
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
return op(a, b)
I looked at other FutureWarnings posted on this website but most of them happen when people are using numpy. I have imported numpy, but I am not using it (or at least I think I'm not...). to top that, not only do I get this warning but it also seems like it didnt work and I still have the september rows in the dataframe afterwards.
So, to summarize, my question is how would I delete those rows depending on the Month value? and why did I get this warning? note, I also tried
df = df[df.Month != '0']
because I thought maybe that was the issue, but that also doesn't work. any ideas on how to do it?
NOTE: I tried taking off the quotes as in:
df[df.Month != 0]
and that stopped the warning but its still not working and the rows were not deleted.