Skip to content

Commit 3013fb4

Browse files
Update dropna docstring (#9257)
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
1 parent b55c783 commit 3013fb4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

xarray/core/dataset.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6371,7 +6371,7 @@ def dropna(
63716371
Data variables:
63726372
temperature (time, location) float64 64B 23.4 24.1 nan ... 24.2 20.5 25.3
63736373
6374-
# Drop NaN values from the dataset
6374+
Drop NaN values from the dataset
63756375
63766376
>>> dataset.dropna(dim="time")
63776377
<xarray.Dataset> Size: 80B
@@ -6382,7 +6382,7 @@ def dropna(
63826382
Data variables:
63836383
temperature (time, location) float64 48B 23.4 24.1 21.8 24.2 20.5 25.3
63846384
6385-
# Drop labels with any NAN values
6385+
Drop labels with any NaN values
63866386
63876387
>>> dataset.dropna(dim="time", how="any")
63886388
<xarray.Dataset> Size: 80B
@@ -6393,7 +6393,7 @@ def dropna(
63936393
Data variables:
63946394
temperature (time, location) float64 48B 23.4 24.1 21.8 24.2 20.5 25.3
63956395
6396-
# Drop labels with all NAN values
6396+
Drop labels with all NAN values
63976397
63986398
>>> dataset.dropna(dim="time", how="all")
63996399
<xarray.Dataset> Size: 104B
@@ -6404,7 +6404,7 @@ def dropna(
64046404
Data variables:
64056405
temperature (time, location) float64 64B 23.4 24.1 nan ... 24.2 20.5 25.3
64066406
6407-
# Drop labels with less than 2 non-NA values
6407+
Drop labels with less than 2 non-NA values
64086408
64096409
>>> dataset.dropna(dim="time", thresh=2)
64106410
<xarray.Dataset> Size: 80B
@@ -6418,6 +6418,11 @@ def dropna(
64186418
Returns
64196419
-------
64206420
Dataset
6421+
6422+
See Also
6423+
--------
6424+
DataArray.dropna
6425+
pandas.DataFrame.dropna
64216426
"""
64226427
# TODO: consider supporting multiple dimensions? Or not, given that
64236428
# there are some ugly edge cases, e.g., pandas's dropna differs

0 commit comments

Comments
 (0)