1

i asigned TEMPERATURE column of NaN value to be zero but not working properly all other columns working properly but this is not senter image description here

expecting to be temperature column nan values to be 0 but not working enter image description here

1 Answers1

0

You set the value for the "TEMPERATURE" key (column in DataFrame) in as string '0' instead of numeric value 0. The following will fill the np.NaN values in the "TEMPERATURE" column with 0:

new1 = hf.fillna({"TEMPERATURE": 0, "WIND SPEED": 0, "EVENT": "no event"})
hlin03
  • 125
  • 7