Published
- 1 min read
pandas fillna with median of column
The solution for this is noted below
pandas fillna with median of column
Solution
df['X'].fillna(df['X'].median(), inplace=True)
Try other methods by searching on the site. That is if this doesn’t work