May be a simply answer so apologies in advance (minimal coding experience).
I am trying to drop any rows with particular string (Economy 7) from ANY column and have been trying to go off this thread:
How to drop rows from pandas data frame that contains a particular string in a particular column?
Couldn't get it to work but tried this code on a previous DataFrame (now df = energy) and it seemed to work although now it comes up with an error:
no_eco = energy[~energy.apply(lambda series: series.str.contains('Economy 7')).any(axis=1)]
AttributeError: ('Can only use .str accessor with string values, which use np.object_ dtype in pandas', 'occurred at index existingProductCodeGas')
Any suggestions? ps DataFrame is extremely large.
Thanks