python - DataFrame usage issues
大家讲道理
大家讲道理 2017-05-18 10:46:18
0
1
590
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[...].

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
巴扎黑

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template