Pandas cumsum()

Jmnote (토론 | 기여)님의 2021년 10월 11일 (월) 02:58 판 (새 문서: ==개요== ;Pandas cumsum() ==시리즈== <syntaxhighlight lang='python' notebook='series'> s = pd.Series([2, np.nan, 5, -1, 0]) </syntaxhighlight> <syntaxhighlight lang='python' not...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

Pandas cumsum()

2 시리즈

s = pd.Series([2, np.nan, 5, -1, 0])
s.cumsum()
s.cumsum(skipna=False)

3 데이터프레임

df = pd.DataFrame([[2.0, 1.0],
                   [3.0, np.nan],
                   [1.0, 0.0]],
                   columns=list('AB'))
df
df.cumsum()
df.cumsum(axis=1)

4 같이 보기

5 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}