@@ -735,6 +735,7 @@ def std(
735
735
self : DatasetReduce ,
736
736
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
737
737
skipna : bool = True ,
738
+ ddof : int = 0 ,
738
739
keep_attrs : bool = None ,
739
740
** kwargs ,
740
741
) -> T_Dataset :
@@ -751,6 +752,9 @@ def std(
751
752
skips missing values for float dtypes; other dtypes either do not
752
753
have a sentinel missing value (int) or skipna=True has not been
753
754
implemented (object, datetime64 or timedelta64).
755
+ ddof : int, default: 0
756
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
757
+ where ``N`` represents the number of elements.
754
758
keep_attrs : bool, optional
755
759
If True, ``attrs`` will be copied from the original
756
760
object to the new one. If False (default), the new object will be
@@ -803,6 +807,16 @@ def std(
803
807
Data variables:
804
808
da (labels) float64 nan 0.0 1.0
805
809
810
+ Specify ``ddof=1`` for an unbiased estimate.
811
+
812
+ >>> ds.groupby("labels").std(skipna=True, ddof=1)
813
+ <xarray.Dataset>
814
+ Dimensions: (labels: 3)
815
+ Coordinates:
816
+ * labels (labels) object 'a' 'b' 'c'
817
+ Data variables:
818
+ da (labels) float64 nan 0.0 1.414
819
+
806
820
See Also
807
821
--------
808
822
numpy.std
@@ -814,6 +828,7 @@ def std(
814
828
duck_array_ops .std ,
815
829
dim = dim ,
816
830
skipna = skipna ,
831
+ ddof = ddof ,
817
832
numeric_only = True ,
818
833
keep_attrs = keep_attrs ,
819
834
** kwargs ,
@@ -823,6 +838,7 @@ def var(
823
838
self : DatasetReduce ,
824
839
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
825
840
skipna : bool = True ,
841
+ ddof : int = 0 ,
826
842
keep_attrs : bool = None ,
827
843
** kwargs ,
828
844
) -> T_Dataset :
@@ -839,6 +855,9 @@ def var(
839
855
skips missing values for float dtypes; other dtypes either do not
840
856
have a sentinel missing value (int) or skipna=True has not been
841
857
implemented (object, datetime64 or timedelta64).
858
+ ddof : int, default: 0
859
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
860
+ where ``N`` represents the number of elements.
842
861
keep_attrs : bool, optional
843
862
If True, ``attrs`` will be copied from the original
844
863
object to the new one. If False (default), the new object will be
@@ -891,6 +910,16 @@ def var(
891
910
Data variables:
892
911
da (labels) float64 nan 0.0 1.0
893
912
913
+ Specify ``ddof=1`` for an unbiased estimate.
914
+
915
+ >>> ds.groupby("labels").var(skipna=True, ddof=1)
916
+ <xarray.Dataset>
917
+ Dimensions: (labels: 3)
918
+ Coordinates:
919
+ * labels (labels) object 'a' 'b' 'c'
920
+ Data variables:
921
+ da (labels) float64 nan 0.0 2.0
922
+
894
923
See Also
895
924
--------
896
925
numpy.var
@@ -902,6 +931,7 @@ def var(
902
931
duck_array_ops .var ,
903
932
dim = dim ,
904
933
skipna = skipna ,
934
+ ddof = ddof ,
905
935
numeric_only = True ,
906
936
keep_attrs = keep_attrs ,
907
937
** kwargs ,
@@ -1692,6 +1722,7 @@ def std(
1692
1722
self : DatasetReduce ,
1693
1723
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
1694
1724
skipna : bool = True ,
1725
+ ddof : int = 0 ,
1695
1726
keep_attrs : bool = None ,
1696
1727
** kwargs ,
1697
1728
) -> T_Dataset :
@@ -1708,6 +1739,9 @@ def std(
1708
1739
skips missing values for float dtypes; other dtypes either do not
1709
1740
have a sentinel missing value (int) or skipna=True has not been
1710
1741
implemented (object, datetime64 or timedelta64).
1742
+ ddof : int, default: 0
1743
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
1744
+ where ``N`` represents the number of elements.
1711
1745
keep_attrs : bool, optional
1712
1746
If True, ``attrs`` will be copied from the original
1713
1747
object to the new one. If False (default), the new object will be
@@ -1760,6 +1794,16 @@ def std(
1760
1794
Data variables:
1761
1795
da (time) float64 0.0 0.8165 nan
1762
1796
1797
+ Specify ``ddof=1`` for an unbiased estimate.
1798
+
1799
+ >>> ds.resample(time="3M").std(skipna=True, ddof=1)
1800
+ <xarray.Dataset>
1801
+ Dimensions: (time: 3)
1802
+ Coordinates:
1803
+ * time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
1804
+ Data variables:
1805
+ da (time) float64 nan 1.0 nan
1806
+
1763
1807
See Also
1764
1808
--------
1765
1809
numpy.std
@@ -1771,6 +1815,7 @@ def std(
1771
1815
duck_array_ops .std ,
1772
1816
dim = dim ,
1773
1817
skipna = skipna ,
1818
+ ddof = ddof ,
1774
1819
numeric_only = True ,
1775
1820
keep_attrs = keep_attrs ,
1776
1821
** kwargs ,
@@ -1780,6 +1825,7 @@ def var(
1780
1825
self : DatasetReduce ,
1781
1826
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
1782
1827
skipna : bool = True ,
1828
+ ddof : int = 0 ,
1783
1829
keep_attrs : bool = None ,
1784
1830
** kwargs ,
1785
1831
) -> T_Dataset :
@@ -1796,6 +1842,9 @@ def var(
1796
1842
skips missing values for float dtypes; other dtypes either do not
1797
1843
have a sentinel missing value (int) or skipna=True has not been
1798
1844
implemented (object, datetime64 or timedelta64).
1845
+ ddof : int, default: 0
1846
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
1847
+ where ``N`` represents the number of elements.
1799
1848
keep_attrs : bool, optional
1800
1849
If True, ``attrs`` will be copied from the original
1801
1850
object to the new one. If False (default), the new object will be
@@ -1848,6 +1897,16 @@ def var(
1848
1897
Data variables:
1849
1898
da (time) float64 0.0 0.6667 nan
1850
1899
1900
+ Specify ``ddof=1`` for an unbiased estimate.
1901
+
1902
+ >>> ds.resample(time="3M").var(skipna=True, ddof=1)
1903
+ <xarray.Dataset>
1904
+ Dimensions: (time: 3)
1905
+ Coordinates:
1906
+ * time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
1907
+ Data variables:
1908
+ da (time) float64 nan 1.0 nan
1909
+
1851
1910
See Also
1852
1911
--------
1853
1912
numpy.var
@@ -1859,6 +1918,7 @@ def var(
1859
1918
duck_array_ops .var ,
1860
1919
dim = dim ,
1861
1920
skipna = skipna ,
1921
+ ddof = ddof ,
1862
1922
numeric_only = True ,
1863
1923
keep_attrs = keep_attrs ,
1864
1924
** kwargs ,
@@ -2587,6 +2647,7 @@ def std(
2587
2647
self : DataArrayReduce ,
2588
2648
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
2589
2649
skipna : bool = True ,
2650
+ ddof : int = 0 ,
2590
2651
keep_attrs : bool = None ,
2591
2652
** kwargs ,
2592
2653
) -> T_DataArray :
@@ -2603,6 +2664,9 @@ def std(
2603
2664
skips missing values for float dtypes; other dtypes either do not
2604
2665
have a sentinel missing value (int) or skipna=True has not been
2605
2666
implemented (object, datetime64 or timedelta64).
2667
+ ddof : int, default: 0
2668
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
2669
+ where ``N`` represents the number of elements.
2606
2670
keep_attrs : bool, optional
2607
2671
If True, ``attrs`` will be copied from the original
2608
2672
object to the new one. If False (default), the new object will be
@@ -2648,6 +2712,14 @@ def std(
2648
2712
Coordinates:
2649
2713
* labels (labels) object 'a' 'b' 'c'
2650
2714
2715
+ Specify ``ddof=1`` for an unbiased estimate.
2716
+
2717
+ >>> da.groupby("labels").std(skipna=True, ddof=1)
2718
+ <xarray.DataArray (labels: 3)>
2719
+ array([ nan, 0. , 1.41421356])
2720
+ Coordinates:
2721
+ * labels (labels) object 'a' 'b' 'c'
2722
+
2651
2723
See Also
2652
2724
--------
2653
2725
numpy.std
@@ -2659,6 +2731,7 @@ def std(
2659
2731
duck_array_ops .std ,
2660
2732
dim = dim ,
2661
2733
skipna = skipna ,
2734
+ ddof = ddof ,
2662
2735
keep_attrs = keep_attrs ,
2663
2736
** kwargs ,
2664
2737
)
@@ -2667,6 +2740,7 @@ def var(
2667
2740
self : DataArrayReduce ,
2668
2741
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
2669
2742
skipna : bool = True ,
2743
+ ddof : int = 0 ,
2670
2744
keep_attrs : bool = None ,
2671
2745
** kwargs ,
2672
2746
) -> T_DataArray :
@@ -2683,6 +2757,9 @@ def var(
2683
2757
skips missing values for float dtypes; other dtypes either do not
2684
2758
have a sentinel missing value (int) or skipna=True has not been
2685
2759
implemented (object, datetime64 or timedelta64).
2760
+ ddof : int, default: 0
2761
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
2762
+ where ``N`` represents the number of elements.
2686
2763
keep_attrs : bool, optional
2687
2764
If True, ``attrs`` will be copied from the original
2688
2765
object to the new one. If False (default), the new object will be
@@ -2728,6 +2805,14 @@ def var(
2728
2805
Coordinates:
2729
2806
* labels (labels) object 'a' 'b' 'c'
2730
2807
2808
+ Specify ``ddof=1`` for an unbiased estimate.
2809
+
2810
+ >>> da.groupby("labels").var(skipna=True, ddof=1)
2811
+ <xarray.DataArray (labels: 3)>
2812
+ array([nan, 0., 2.])
2813
+ Coordinates:
2814
+ * labels (labels) object 'a' 'b' 'c'
2815
+
2731
2816
See Also
2732
2817
--------
2733
2818
numpy.var
@@ -2739,6 +2824,7 @@ def var(
2739
2824
duck_array_ops .var ,
2740
2825
dim = dim ,
2741
2826
skipna = skipna ,
2827
+ ddof = ddof ,
2742
2828
keep_attrs = keep_attrs ,
2743
2829
** kwargs ,
2744
2830
)
@@ -3458,6 +3544,7 @@ def std(
3458
3544
self : DataArrayReduce ,
3459
3545
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
3460
3546
skipna : bool = True ,
3547
+ ddof : int = 0 ,
3461
3548
keep_attrs : bool = None ,
3462
3549
** kwargs ,
3463
3550
) -> T_DataArray :
@@ -3474,6 +3561,9 @@ def std(
3474
3561
skips missing values for float dtypes; other dtypes either do not
3475
3562
have a sentinel missing value (int) or skipna=True has not been
3476
3563
implemented (object, datetime64 or timedelta64).
3564
+ ddof : int, default: 0
3565
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
3566
+ where ``N`` represents the number of elements.
3477
3567
keep_attrs : bool, optional
3478
3568
If True, ``attrs`` will be copied from the original
3479
3569
object to the new one. If False (default), the new object will be
@@ -3519,6 +3609,14 @@ def std(
3519
3609
Coordinates:
3520
3610
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
3521
3611
3612
+ Specify ``ddof=1`` for an unbiased estimate.
3613
+
3614
+ >>> da.resample(time="3M").std(skipna=True, ddof=1)
3615
+ <xarray.DataArray (time: 3)>
3616
+ array([nan, 1., nan])
3617
+ Coordinates:
3618
+ * time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
3619
+
3522
3620
See Also
3523
3621
--------
3524
3622
numpy.std
@@ -3530,6 +3628,7 @@ def std(
3530
3628
duck_array_ops .std ,
3531
3629
dim = dim ,
3532
3630
skipna = skipna ,
3631
+ ddof = ddof ,
3533
3632
keep_attrs = keep_attrs ,
3534
3633
** kwargs ,
3535
3634
)
@@ -3538,6 +3637,7 @@ def var(
3538
3637
self : DataArrayReduce ,
3539
3638
dim : Union [None , Hashable , Sequence [Hashable ]] = None ,
3540
3639
skipna : bool = True ,
3640
+ ddof : int = 0 ,
3541
3641
keep_attrs : bool = None ,
3542
3642
** kwargs ,
3543
3643
) -> T_DataArray :
@@ -3554,6 +3654,9 @@ def var(
3554
3654
skips missing values for float dtypes; other dtypes either do not
3555
3655
have a sentinel missing value (int) or skipna=True has not been
3556
3656
implemented (object, datetime64 or timedelta64).
3657
+ ddof : int, default: 0
3658
+ “Delta Degrees of Freedom”: the divisor used in the calculation is ``N - ddof``,
3659
+ where ``N`` represents the number of elements.
3557
3660
keep_attrs : bool, optional
3558
3661
If True, ``attrs`` will be copied from the original
3559
3662
object to the new one. If False (default), the new object will be
@@ -3599,6 +3702,14 @@ def var(
3599
3702
Coordinates:
3600
3703
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
3601
3704
3705
+ Specify ``ddof=1`` for an unbiased estimate.
3706
+
3707
+ >>> da.resample(time="3M").var(skipna=True, ddof=1)
3708
+ <xarray.DataArray (time: 3)>
3709
+ array([nan, 1., nan])
3710
+ Coordinates:
3711
+ * time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
3712
+
3602
3713
See Also
3603
3714
--------
3604
3715
numpy.var
@@ -3610,6 +3721,7 @@ def var(
3610
3721
duck_array_ops .var ,
3611
3722
dim = dim ,
3612
3723
skipna = skipna ,
3724
+ ddof = ddof ,
3613
3725
keep_attrs = keep_attrs ,
3614
3726
** kwargs ,
3615
3727
)
0 commit comments