用法:
Series.count(level=None)
返回係列中非 NA/空觀測值的數量。
- level:int 或級別名稱,默認無
如果軸是 MultiIndex(分層),則沿特定級別計數,折疊成較小的係列。
- int 或 Series(如果指定了級別)
係列中非空值的數量。
參數:
返回:
例子:
>>> s = pd.Series([0.0, 1.0, np.nan]) >>> s.count() 2
相關用法
- Python pandas.Series.combine_first用法及代碼示例
- Python pandas.Series.convert_dtypes用法及代碼示例
- Python pandas.Series.combine用法及代碼示例
- Python pandas.Series.compare用法及代碼示例
- Python pandas.Series.copy用法及代碼示例
- Python pandas.Series.cov用法及代碼示例
- Python pandas.Series.corr用法及代碼示例
- Python pandas.Series.cat.remove_categories用法及代碼示例
- Python pandas.Series.cat用法及代碼示例
- Python pandas.Series.cat.rename_categories用法及代碼示例
- Python pandas.Series.cumsum用法及代碼示例
- Python pandas.Series.cat.add_categories用法及代碼示例
- Python pandas.Series.cumprod用法及代碼示例
- Python pandas.Series.cummin用法及代碼示例
- Python pandas.Series.cummax用法及代碼示例
- Python pandas.Series.clip用法及代碼示例
- Python pandas.Series.cat.remove_unused_categories用法及代碼示例
- Python pandas.Series.add_prefix用法及代碼示例
- Python pandas.Series.map用法及代碼示例
- Python pandas.Series.max用法及代碼示例
注:本文由純淨天空篩選整理自pandas.pydata.org大神的英文原創作品 pandas.Series.count。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。