fram=DataFrame(records)
cframe=fram[fram['a'].notnull()]
The second line cannot be understood. fram['a'].notnull()
is pandas.core.series.Series
, how can I pass fram[.. .]
Converted to pandas.core.frame.DataFrame
. What is the syntax of frame[...]
.
fram['a'].notnull() will return a list of Boolean values, and then use fram[] to get the rows with true values. This is a common usage of pandas to get the number of rows.