@@ -3367,40 +3367,128 @@ def nunique(self):
3367
3367
raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
3368
3368
3369
3369
def cummin (self ) -> DataFrame :
3370
- """Return cumulative minimum over a DataFrame axis .
3370
+ """Return cumulative minimum over columns .
3371
3371
3372
3372
Returns a DataFrame of the same size containing the cumulative minimum.
3373
3373
3374
+ **Examples:**
3375
+
3376
+ >>> import bigframes.pandas as bpd
3377
+ >>> bpd.options.display.progress_bar = None
3378
+
3379
+ >>> df = bpd.DataFrame({"A": [3, 1, 2], "B": [1, 2, 3]})
3380
+ >>> df
3381
+ A B
3382
+ 0 3 1
3383
+ 1 1 2
3384
+ 2 2 3
3385
+ <BLANKLINE>
3386
+ [3 rows x 2 columns]
3387
+
3388
+ >>> df.cummin()
3389
+ A B
3390
+ 0 3 1
3391
+ 1 1 1
3392
+ 2 1 1
3393
+ <BLANKLINE>
3394
+ [3 rows x 2 columns]
3395
+
3374
3396
Returns:
3375
3397
bigframes.dataframe.DataFrame: Return cumulative minimum of DataFrame.
3376
3398
"""
3377
3399
raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
3378
3400
3379
3401
def cummax (self ) -> DataFrame :
3380
- """Return cumulative maximum over a DataFrame axis .
3402
+ """Return cumulative maximum over columns .
3381
3403
3382
3404
Returns a DataFrame of the same size containing the cumulative maximum.
3383
3405
3406
+ **Examples:**
3407
+
3408
+ >>> import bigframes.pandas as bpd
3409
+ >>> bpd.options.display.progress_bar = None
3410
+
3411
+ >>> df = bpd.DataFrame({"A": [3, 1, 2], "B": [1, 2, 3]})
3412
+ >>> df
3413
+ A B
3414
+ 0 3 1
3415
+ 1 1 2
3416
+ 2 2 3
3417
+ <BLANKLINE>
3418
+ [3 rows x 2 columns]
3419
+
3420
+ >>> df.cummax()
3421
+ A B
3422
+ 0 3 1
3423
+ 1 3 2
3424
+ 2 3 3
3425
+ <BLANKLINE>
3426
+ [3 rows x 2 columns]
3427
+
3384
3428
Returns:
3385
3429
bigframes.dataframe.DataFrame: Return cumulative maximum of DataFrame.
3386
3430
"""
3387
3431
raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
3388
3432
3389
3433
def cumsum (self ) -> DataFrame :
3390
- """Return cumulative sum over a DataFrame axis .
3434
+ """Return cumulative sum over columns .
3391
3435
3392
3436
Returns a DataFrame of the same size containing the cumulative sum.
3393
3437
3438
+ **Examples:**
3439
+
3440
+ >>> import bigframes.pandas as bpd
3441
+ >>> bpd.options.display.progress_bar = None
3442
+
3443
+ >>> df = bpd.DataFrame({"A": [3, 1, 2], "B": [1, 2, 3]})
3444
+ >>> df
3445
+ A B
3446
+ 0 3 1
3447
+ 1 1 2
3448
+ 2 2 3
3449
+ <BLANKLINE>
3450
+ [3 rows x 2 columns]
3451
+
3452
+ >>> df.cumsum()
3453
+ A B
3454
+ 0 3 1
3455
+ 1 4 3
3456
+ 2 6 6
3457
+ <BLANKLINE>
3458
+ [3 rows x 2 columns]
3459
+
3394
3460
Returns:
3395
3461
bigframes.dataframe.DataFrame: Return cumulative sum of DataFrame.
3396
3462
"""
3397
3463
raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
3398
3464
3399
3465
def cumprod (self ) -> DataFrame :
3400
- """Return cumulative product over a DataFrame axis .
3466
+ """Return cumulative product over columns .
3401
3467
3402
3468
Returns a DataFrame of the same size containing the cumulative product.
3403
3469
3470
+ **Examples:**
3471
+
3472
+ >>> import bigframes.pandas as bpd
3473
+ >>> bpd.options.display.progress_bar = None
3474
+
3475
+ >>> df = bpd.DataFrame({"A": [3, 1, 2], "B": [1, 2, 3]})
3476
+ >>> df
3477
+ A B
3478
+ 0 3 1
3479
+ 1 1 2
3480
+ 2 2 3
3481
+ <BLANKLINE>
3482
+ [3 rows x 2 columns]
3483
+
3484
+ >>> df.cumprod()
3485
+ A B
3486
+ 0 3 1
3487
+ 1 3 2
3488
+ 2 6 6
3489
+ <BLANKLINE>
3490
+ [3 rows x 2 columns]
3491
+
3404
3492
Returns:
3405
3493
bigframes.dataframe.DataFrame: Return cumulative product of DataFrame.
3406
3494
"""
0 commit comments