I am using pandas and matplotlib to evaluate an excel sheet that I have converted to a dataframe. However, two of my columns have zeros as values in some of the rows, which I need to remove. We are talking a couple thousand rows for the dataframe total.
The zeros only appear in two of my 8 columns. I'd like to remove any rows that have zeros in one or both of those two columns.
Does anyone know how I may go about doing this? I've tried df.loc[(df!=0).any(1)] but to no avail.
Any and all help would be greatly appreciated.