From d804de5c8b9752b35fece4015697a8d72292b4e1 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 16 Aug 2021 10:51:47 -0700 Subject: [PATCH] Add back Series examples. --- python/cudf/cudf/core/frame.py | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/python/cudf/cudf/core/frame.py b/python/cudf/cudf/core/frame.py index 37584d2c3e4..324c555f974 100644 --- a/python/cudf/cudf/core/frame.py +++ b/python/cudf/cudf/core/frame.py @@ -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() @@ -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() @@ -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() @@ -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()