Commit 37e5f78
BUG: Group-by numeric type-coercion with datetime
closes pandas-dev#14423
closes pandas-dev#15421
closes pandas-dev#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 pandas-dev#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 datetime1 parent e7956c4 commit 37e5f78
File tree
3 files changed
+54
-2
lines changed- doc/source/whatsnew
- pandas
- core
- tests/groupby
3 files changed
+54
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
853 | | - | |
| 853 | + | |
| 854 | + | |
854 | 855 | | |
855 | 856 | | |
856 | 857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
3424 | 3425 | | |
3425 | 3426 | | |
3426 | 3427 | | |
| 3428 | + | |
3427 | 3429 | | |
3428 | 3430 | | |
3429 | 3431 | | |
| |||
3566 | 3568 | | |
3567 | 3569 | | |
3568 | 3570 | | |
3569 | | - | |
| 3571 | + | |
| 3572 | + | |
3570 | 3573 | | |
3571 | 3574 | | |
3572 | 3575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4314 | 4314 | | |
4315 | 4315 | | |
4316 | 4316 | | |
| 4317 | + | |
| 4318 | + | |
| 4319 | + | |
| 4320 | + | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
| 4324 | + | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
| 4330 | + | |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
| 4336 | + | |
| 4337 | + | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
| 4354 | + | |
| 4355 | + | |
| 4356 | + | |
| 4357 | + | |
| 4358 | + | |
| 4359 | + | |
| 4360 | + | |
| 4361 | + | |
| 4362 | + | |
| 4363 | + | |
| 4364 | + | |
4317 | 4365 | | |
4318 | 4366 | | |
4319 | 4367 | | |
| |||
0 commit comments