0

I'm testing graphlabe create with following

sf=gl.SFrame(['t1','t2','','t3','','t4'])
sf.dropna()

accoding to graphlab api

the above should remove empty values(na), but actually it does not, and no errors given either. anyone knows why?

Community
  • 1
  • 1
ikel
  • 1,790
  • 6
  • 31
  • 61

1 Answers1

0

Your '' is either None nor NaN:

import math

print(None == '')
print(float('nan')=='')
print(math.isnan(float('nan')))

Output:

False
False
True

Doku: dropna()

Remove missing values from an SFrame. A missing value is either None or NaN.

Your value '' is neither so it stays.

Patrick Artner
  • 50,409
  • 9
  • 43
  • 69