0

What's the difference between a cell value of NaN and None? I used df.dropna(), which drops all NaN but I still have a lot of None.

I am wondering what's the difference between them and how do I get rid of None as well?

Thanks!

Edamame
  • 23,718
  • 73
  • 186
  • 320
  • 4
    see this question: http://stackoverflow.com/questions/17534106/what-is-the-difference-between-nan-and-none#17534682 – szeitlin Sep 02 '16 at 21:52

1 Answers1

0

@szeitlin already gave a link to a similar question, but if you need this: you can convert a NaN to None

df1 = df.where((pd.notnull(df)), None)

or None to NaN:

import numpy as np
x = np.array(x)
x = x.astype(float)
vlad.rad
  • 1,055
  • 2
  • 10
  • 28