datatable.Frame.countna()

Report the number of NA values in each column of the frame.

Parameters

return
Frame

The frame will have one row and the same number/names of columns as in the current frame. All columns will have stype int64.

Examples

DT = dt.Frame(A=[1, 5, None], B=[math.nan]*3, C=[None, None, 'bah!']) DT.countna()
ABC
int64int64int64
0132
DT.countna().to_tuples()[0] (1, 3, 2)

See Also

  • .countna1() – similar to this method, but operates on a single-column frame only, and returns a number instead of a Frame.

  • dt.count() – function for counting non-NA (“valid”) values in a column; can also be applied per-group.