What is the best way to account for (not a number) nan values in a pandas DataFrame?
The following code:
import numpy as np import pandas as pd dfd =
To count just null values, you can use isnull():
In [11]: dfd.isnull().sum() Out[11]: a 2 dtype: int64
Here a is the column name, and there are 2 occurrences of the null value in the column.
a