How to drop rows which satisfies this condition:
df_covid_big_data.drop(df_covid_big_data['Confirmed'] < df_covid_big_data['Deaths'],axis=0,inplace=True)
How to drop rows which satisfies this condition:
df_covid_big_data.drop(df_covid_big_data['Confirmed'] < df_covid_big_data['Deaths'],axis=0,inplace=True)
You are very close, try this:
df_covid_big_data.drop(
df_covid_big_data[
df_covid_big_data['Confirmed'] < df_covid_big_data['Deaths']].index,
inplace=True)
Wouldn't it be easier to just reverse the conditions?
df_covid_big_data[df_covid_big_data['Confirmed'] > df_covid_big_data['Deaths']]