Scenario: I have a dataframe with some nan scattered around. It has multiple columns, the ones of interest are "bid" and "ask"
What I want to do: I want to remove all rows where the bid column value is nan AND the ask column value is nan.
Question: What is the best way to do it?
What I already tried:
ab_df = ab_df[ab_df.bid != 'nan' and ab_df.ask != 'nan'] ab_df = ab_df[ab_df.bid.empty and ab_df.ask.empty] ab_df = ab_df[ab_df.bid.notnull and ab_df.ask.notnull] But none of them work.