From cc723223db57d3073474656aed888b4a47a4fc73 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Mon, 10 Jun 2024 09:20:30 -0600 Subject: [PATCH] Update dropna docstring --- xarray/core/dataset.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 09597670573..260059b0038 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -6366,7 +6366,7 @@ def dropna( Data variables: temperature (time, location) float64 64B 23.4 24.1 nan ... 24.2 20.5 25.3 - # Drop NaN values from the dataset + Drop NaN values from the dataset >>> dataset.dropna(dim="time") Size: 80B @@ -6377,7 +6377,7 @@ def dropna( Data variables: temperature (time, location) float64 48B 23.4 24.1 21.8 24.2 20.5 25.3 - # Drop labels with any NAN values + Drop labels with any NaN values >>> dataset.dropna(dim="time", how="any") Size: 80B @@ -6388,7 +6388,7 @@ def dropna( Data variables: temperature (time, location) float64 48B 23.4 24.1 21.8 24.2 20.5 25.3 - # Drop labels with all NAN values + Drop labels with all NAN values >>> dataset.dropna(dim="time", how="all") Size: 104B @@ -6399,7 +6399,7 @@ def dropna( Data variables: temperature (time, location) float64 64B 23.4 24.1 nan ... 24.2 20.5 25.3 - # Drop labels with less than 2 non-NA values + Drop labels with less than 2 non-NA values >>> dataset.dropna(dim="time", thresh=2) Size: 80B @@ -6413,6 +6413,11 @@ def dropna( Returns ------- Dataset + + See Also + -------- + DataArray.dropna + pandas.DataFrame.dropna """ # TODO: consider supporting multiple dimensions? Or not, given that # there are some ugly edge cases, e.g., pandas's dropna differs