2

Just out of curiosity I would like to have a quick explanation of the following "issue".

When I did this:

data_ogd.iloc[:, 3:10].fillna(value=0, inplace=True)

nothing changed at my dataframe columns and I still had the NAs at these columns.

But when I did this:

data_ogd.iloc[:, 3:10] = data_ogd.iloc[:, 3:10].fillna(value=0)

The NAs were filled with 0s.

Why was this happening?

Outcast
  • 4,967
  • 5
  • 44
  • 99

0 Answers0