xorbits.pandas.window.Expanding.count#

Expanding.count()[源代码]#

Calculate the expanding count of non NaN observations.

返回

Return type is the same as the original object with np.float64 dtype.

返回类型

Series or DataFrame

参见

pandas.Series.expanding

Calling expanding with Series data.

pandas.DataFrame.expanding

Calling expanding with DataFrames.

pandas.Series.count

Aggregating count for Series.

pandas.DataFrame.count

Aggregating count for DataFrame.

实际案例

>>> ser = pd.Series([1, 2, 3, 4], index=['a', 'b', 'c', 'd'])  
>>> ser.expanding().count()  
a    1.0
b    2.0
c    3.0
d    4.0
dtype: float64

This docstring was copied from pandas.core.window.expanding.Expanding.