Skip to content

Commit

Permalink
Add back Series examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Aug 16, 2021
1 parent 939b455 commit d804de5
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4246,6 +4246,19 @@ def cummin(self, axis=None, skipna=True, *args, **kwargs):
Examples
--------
**Series**
>>> import cudf
>>> ser = cudf.Series([1, 5, 2, 4, 3])
>>> ser.cummin()
0 1
1 1
2 1
3 1
4 1
**DataFrame**
>>> import cudf
>>> df = cudf.DataFrame({'a': [1, 2, 3, 4], 'b': [7, 8, 9, 10]})
>>> df.cummin()
Expand Down Expand Up @@ -4276,6 +4289,19 @@ def cummax(self, axis=None, skipna=True, *args, **kwargs):
Examples
--------
**Series**
>>> import cudf
>>> ser = cudf.Series([1, 5, 2, 4, 3])
>>> ser.cummax()
0 1
1 5
2 5
3 5
4 5
**DataFrame**
>>> import cudf
>>> df = cudf.DataFrame({'a': [1, 2, 3, 4], 'b': [7, 8, 9, 10]})
>>> df.cummax()
Expand Down Expand Up @@ -4307,6 +4333,19 @@ def cumsum(self, axis=None, skipna=True, *args, **kwargs):
Examples
--------
**Series**
>>> import cudf
>>> ser = cudf.Series([1, 5, 2, 4, 3])
>>> ser.cumsum()
0 1
1 6
2 8
3 12
4 15
**DataFrame**
>>> import cudf
>>> df = cudf.DataFrame({'a': [1, 2, 3, 4], 'b': [7, 8, 9, 10]})
>>> s.cumsum()
Expand Down Expand Up @@ -4339,6 +4378,19 @@ def cumprod(self, axis=None, skipna=True, *args, **kwargs):
Examples
--------
**Series**
>>> import cudf
>>> ser = cudf.Series([1, 5, 2, 4, 3])
>>> ser.cumprod()
0 1
1 5
2 10
3 40
4 120
**DataFrame**
>>> import cudf
>>> df = cudf.DataFrame({'a': [1, 2, 3, 4], 'b': [7, 8, 9, 10]})
>>> s.cumprod()
Expand Down

0 comments on commit d804de5

Please sign in to comment.