Skip to content

Commit 1a852d1

Browse files
committed
DOC: creating a Series from a list is more natural than a DataFrame
1 parent faed25c commit 1a852d1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pandas/core/window.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -937,14 +937,14 @@ def skew(self, **kwargs):
937937
-1.200000
938938
>>> print("{0:.6f}".format(scipy.stats.kurtosis(arr[1:], bias=False)))
939939
3.999946
940-
>>> df = pd.DataFrame(arr)
941-
>>> df.rolling(4).kurt()
942-
0
943-
0 NaN
944-
1 NaN
945-
2 NaN
946-
3 -1.200000
947-
4 3.999946
940+
>>> s = pd.Series(arr)
941+
>>> s.rolling(4).kurt()
942+
0 NaN
943+
1 NaN
944+
2 NaN
945+
3 -1.200000
946+
4 3.999946
947+
dtype: float64
948948
""")
949949

950950
def kurt(self, **kwargs):

0 commit comments

Comments
 (0)