I am trying to replace NaN values in a given dataset with this

import pandas as pd 
import quandl
import math

df.fillna(-9999, implace=True)

But I keep on getting this error:


Traceback (most recent call last):

File "regression.py", line 44, in df.fillna(0,implace=True)

File "/home/compname/.local/lib/python3.6/site-packages/pandas/core/frame.py", line 3790, in fillna downcast=downcast, **kwargs)

TypeError: fillna() got an unexpected keyword argument 'implace'


  • 1
    $\begingroup$ You should put inplace not implace :) Welcome ;) $\endgroup$ – Media Dec 19 '18 at 17:01
  • $\begingroup$ Can someone flag this as a typo and off topic (because this belongs to SO). $\endgroup$ – Matthieu Brucher Dec 19 '18 at 17:05

You have a typo, change implace for inplace (change the m for the n)

  • $\begingroup$ @Kizito if you have a programming question, go to stackoverflow, that's where these questions should be asked, not here. $\endgroup$ – Matthieu Brucher Dec 19 '18 at 17:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.