0

I have two rows like that:

enter image description here

How can I drop it?

I try:

to_excl = df.loc[df['tabela_segproposta.RENOVAR'].isnull()]
df = df[df['tabela_segproposta.RENOVAR'].isin(to_excl).index]
df

but nothings happen

Mayank Porwal
  • 33,470
  • 8
  • 37
  • 58
LpCoutinho
  • 37
  • 4
  • See [.dropna](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html) method. You can use: `df.dropna(subset=['tabela_segproposta.RENOVAR'])`. – Cainã Max Couto-Silva Nov 27 '20 at 15:36
  • Does this answer your question? [How to drop rows of Pandas DataFrame whose value in a certain column is NaN](https://stackoverflow.com/questions/13413590/how-to-drop-rows-of-pandas-dataframe-whose-value-in-a-certain-column-is-nan) – Mayank Porwal Nov 27 '20 at 16:17

1 Answers1

0

you can use:

new_df = df[~df['tabela_segproposta.RENOVAR'].isnull()]
sophocles
  • 13,593
  • 3
  • 14
  • 33