Skip to content

Commit 0b8efa9

Browse files
committed
Removed erroneous 's', reverted whatsnew to bugfix
1 parent 816e49a commit 0b8efa9

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

doc/source/whatsnew/v1.1.0.rst

+1-29
Original file line numberDiff line numberDiff line change
@@ -380,35 +380,6 @@ Assignment to multiple columns of a :class:`DataFrame` when some of the columns
380380
df[['a', 'c']] = 1
381381
df
382382
383-
.. _whatsnew_110.api_breaking.as_index_false_with_std_and_sem:
384-
385-
:meth:`DataFrameGroupby.std` and :meth:`DataFrameGroupby.sem` preserve group keys when ``as_index=False``
386-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
387-
388-
Using :meth:`DataFrameGroupby.std` and :meth:`DataFrameGroupby.sem` would previously alter the group keys when ``as_index=False``. Now, they are correctly left as the group keys. (:issue:`10355`)
389-
390-
.. ipython:: python
391-
392-
df = pd.DataFrame({"a": [0, 0, 1, 1, 2, 2], "b": [1, 1, 2, 3, 5, 8]})
393-
df
394-
395-
*Previous behavior*:
396-
397-
.. code-block:: ipython
398-
399-
In [3]: df.groupby("a", as_index=False).std()
400-
Out[3]:
401-
a b
402-
0 0.000000 0.000000
403-
1 1.000000 0.707107
404-
2 1.414214 2.121320
405-
406-
*New behavior*:
407-
408-
.. ipython:: python
409-
410-
df.groupby("a", as_index=False).std()
411-
412383
.. _whatsnew_110.deprecations:
413384

414385
Deprecations
@@ -632,6 +603,7 @@ Groupby/resample/rolling
632603
- Bug in :meth:`DataFrame.resample` where an ``AmbiguousTimeError`` would be raised when the resulting timezone aware :class:`DatetimeIndex` had a DST transition at midnight (:issue:`25758`)
633604
- Bug in :meth:`DataFrame.groupby` where a ``ValueError`` would be raised when grouping by a categorical column with read-only categories and ``sort=False`` (:issue:`33410`)
634605
- Bug in :meth:`GroupBy.first` and :meth:`GroupBy.last` where None is not preserved in object dtype (:issue:`32800`)
606+
- Bug in :meth:`DataFrameGroupby.std` and :meth:`DataFrameGroupby.sem` would modify grouped-by columns when ``as_index=False`` (:issue:`10355`)
635607

636608
Reshaping
637609
^^^^^^^^^

pandas/core/groupby/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ def std(self, ddof: int = 1):
12711271
Degrees of freedom.
12721272
12731273
Returns
1274-
-------s
1274+
-------
12751275
Series or DataFrame
12761276
Standard deviation of values within each group.
12771277
"""

0 commit comments

Comments
 (0)