You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
closes#14423closes#15421closes#15670
During a group-by/apply
on a DataFrame, in the presence of one or more DateTime-like columns,
Pandas would incorrectly coerce the type of all other columns to
numeric. E.g. a String column would be coerced to numeric, producing
NaNs.
Author: Greg Williams <[email protected]>
Closes#15680 from gwpdt/bugfix14423 and squashes the following commits:
e1ed104 [Greg Williams] TST: Rename and expand test_numeric_coercion
0a15674 [Greg Williams] CLN: move import, add whatsnew entry
c8844e0 [Greg Williams] CLN: PEP8 (whitespace fixes)
46d12c2 [Greg Williams] BUG: Group-by numeric type-coericion with datetime
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.20.0.txt
+2-1
Original file line number
Diff line number
Diff line change
@@ -850,7 +850,8 @@ Bug Fixes
850
850
- Bug in ``SparseSeries.reindex`` on single level with list of length 1 (:issue:`15447`)
851
851
852
852
853
-
- Bug in groupby operations with timedelta64 when passing ``numeric_only=False`` (:issue:`5724`)
853
+
- Bug in groupby operations with timedelta64 when passing ``numeric_only=False`` (:issue:`5724`)
854
+
- Bug in ``groupby.apply()`` coercing ``object`` dtypes to numeric types, when not all values were numeric (:issue:`14423`, :issue:`15421`, :issue:`15670`)
854
855
855
856
856
857
- Bug in ``DataFrame.to_html`` with ``index=False`` and ``max_rows`` raising in ``IndexError`` (:issue:`14998`)
0 commit comments