@@ -1289,9 +1289,57 @@ def duplicated(self, subset=None, keep="first"):
12891289
12901290 def dropna (
12911291 self ,
1292+ * ,
1293+ axis : int | str = 0 ,
1294+ how : str = "any" ,
1295+ ignore_index = False ,
12921296 ) -> DataFrame :
12931297 """Remove missing values.
12941298
1299+ **Examples:**
1300+
1301+ >>> import bigframes.pandas as bpd
1302+ >>> bpd.options.display.progress_bar = None
1303+
1304+ >>> df = bpd.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'],
1305+ ... "toy": [np.nan, 'Batmobile', 'Bullwhip'],
1306+ ... "born": [bpd.NA, "1940-04-25", bpd.NA]})
1307+ >>> df
1308+ name toy born
1309+ 0 Alfred <NA> <NA>
1310+ 1 Batman Batmobile 1940-04-25
1311+ 2 Catwoman Bullwhip <NA>
1312+ <BLANKLINE>
1313+ [3 rows x 3 columns]
1314+
1315+ Drop the rows where at least one element is missing:
1316+
1317+ >>> df.dropna()
1318+ name toy born
1319+ 1 Batman Batmobile 1940-04-25
1320+ <BLANKLINE>
1321+ [1 rows x 3 columns]
1322+
1323+ Drop the columns where at least one element is missing.
1324+
1325+ >>> df.dropna(axis='columns')
1326+ name
1327+ 0 Alfred
1328+ 1 Batman
1329+ 2 Catwoman
1330+ <BLANKLINE>
1331+ [3 rows x 1 columns]
1332+
1333+ Drop the rows where all elements are missing:
1334+
1335+ >>> df.dropna(how='all')
1336+ name toy born
1337+ 0 Alfred <NA> <NA>
1338+ 1 Batman Batmobile 1940-04-25
1339+ 2 Catwoman Bullwhip <NA>
1340+ <BLANKLINE>
1341+ [3 rows x 3 columns]
1342+
12951343 Args:
12961344 axis ({0 or 'index', 1 or 'columns'}, default 'columns'):
12971345 Determine if rows or columns which contain missing values are
@@ -1318,6 +1366,39 @@ def isin(self, values):
13181366 """
13191367 Whether each element in the DataFrame is contained in values.
13201368
1369+ **Examples:**
1370+
1371+ >>> import bigframes.pandas as bpd
1372+ >>> bpd.options.display.progress_bar = None
1373+
1374+ >>> df = bpd.DataFrame({'num_legs': [2, 4], 'num_wings': [2, 0]},
1375+ ... index=['falcon', 'dog'])
1376+ >>> df
1377+ num_legs num_wings
1378+ falcon 2 2
1379+ dog 4 0
1380+ <BLANKLINE>
1381+ [2 rows x 2 columns]
1382+
1383+ When ``values`` is a list check whether every value in the DataFrame is
1384+ present in the list (which animals have 0 or 2 legs or wings).
1385+
1386+ >>> df.isin([0, 2])
1387+ num_legs num_wings
1388+ falcon True True
1389+ dog False True
1390+ <BLANKLINE>
1391+ [2 rows x 2 columns]
1392+
1393+ When ``values`` is a dict, we can pass it to check for each column separately:
1394+
1395+ >>> df.isin({'num_wings': [0, 3]})
1396+ num_legs num_wings
1397+ falcon False False
1398+ dog False True
1399+ <BLANKLINE>
1400+ [2 rows x 2 columns]
1401+
13211402 Args:
13221403 values (iterable, or dict):
13231404 The result will only be true at a location if all the
0 commit comments