datatable.Frame.countna()¶
countna
()
Report the number of NA values in each column of the frame.
Parameters¶
return
FrameThe 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()
| A | B | C | ||
|---|---|---|---|---|
| int64 | int64 | int64 | ||
| 0 | 1 | 3 | 2 |
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.
The content on this page is licensed under the Creative Commons Attribution 4.0 License
(CC BY 4.0) ,
and code samples are licensed under the MIT License.