SFrame.dropna_split(self, columns=None, how='any')

Split rows with missing values from this SFrame. This function has the same functionality as dropna(), but returns a tuple of two SFrames. The first item is the expected output from dropna(), and the second item contains all the rows filtered out by the dropna algorithm.

columns : list or str, optional

The columns to use when looking for missing values. By default, all columns are used.

how : {‘any’, ‘all’}, optional

Specifies whether a row should be dropped if at least one column has missing values, or if all columns have missing values. ‘any’ is default.

out : (SFrame, SFrame)
(SFrame with missing values removed,

SFrame with the removed missing values)

See also



>>> sf = turicreate.SFrame({'a': [1, None, None], 'b': ['a', 'b', None]})
>>> good, bad = sf.dropna_split()
>>> good
| a | b |
| 1 | a |
[1 rows x 2 columns]
>>> bad
|  a   |  b   |
| None |  b   |
| None | None |
[2 rows x 2 columns]