@@ -1777,6 +1777,42 @@ def between(
1777
1777
corresponding Series element is between the boundary values `left` and
1778
1778
`right`. NA values are treated as `False`.
1779
1779
1780
+ **Examples:**
1781
+
1782
+ >>> import bigframes.pandas as bpd
1783
+ >>> bpd.options.display.progress_bar = None
1784
+
1785
+ Boundary values are included by default:
1786
+
1787
+ >>> s = bpd.Series([2, 0, 4, 8, np.nan])
1788
+ >>> s.between(1, 4)
1789
+ 0 True
1790
+ 1 False
1791
+ 2 True
1792
+ 3 False
1793
+ 4 <NA>
1794
+ dtype: boolean
1795
+
1796
+ With inclusive set to "neither" boundary values are excluded:
1797
+
1798
+ >>> s.between(1, 4, inclusive="neither")
1799
+ 0 True
1800
+ 1 False
1801
+ 2 False
1802
+ 3 False
1803
+ 4 <NA>
1804
+ dtype: boolean
1805
+
1806
+ left and right can be any scalar value:
1807
+
1808
+ >>> s = bpd.Series(['Alice', 'Bob', 'Carol', 'Eve'])
1809
+ >>> s.between('Anna', 'Daniel')
1810
+ 0 False
1811
+ 1 True
1812
+ 2 True
1813
+ 3 False
1814
+ dtype: boolean
1815
+
1780
1816
Args:
1781
1817
left (scalar or list-like):
1782
1818
Left boundary.
@@ -1799,6 +1835,30 @@ def cumprod(self):
1799
1835
Returns a DataFrame or Series of the same size containing the cumulative
1800
1836
product.
1801
1837
1838
+ **Examples:**
1839
+
1840
+ >>> import bigframes.pandas as bpd
1841
+ >>> bpd.options.display.progress_bar = None
1842
+
1843
+ >>> s = bpd.Series([2, np.nan, 5, -1, 0])
1844
+ >>> s
1845
+ 0 2.0
1846
+ 1 <NA>
1847
+ 2 5.0
1848
+ 3 -1.0
1849
+ 4 0.0
1850
+ dtype: Float64
1851
+
1852
+ By default, NA values are ignored.
1853
+
1854
+ >>> s.cumprod()
1855
+ 0 2.0
1856
+ 1 <NA>
1857
+ 2 10.0
1858
+ 3 -10.0
1859
+ 4 0.0
1860
+ dtype: Float64
1861
+
1802
1862
Returns:
1803
1863
bigframes.series.Series: Return cumulative sum of scalar or Series.
1804
1864
"""
0 commit comments