Commit fb7dc7d
BUG: Parse two date columns broken in read_csv with multiple headers
In `io/parsers/_try_convert_dates()` when selecting
columns based on a column index from a set of columns with multi-
level names, the column `name` was converted to a string. This
appears to be a bug since the `name` was a tuple before the
conversion. This causes problems downstream when there is an attempt
to use this name to lookup a column, and that lookup fails because
the desired column is keyed from the tuple, not its string
representation
closes #15376
Author: Stephen Rauch <[email protected]>
Closes #15378 from stephenrauch/fix_read_csv_merge_datetime and squashes the following commits:
030f5ec [Stephen Rauch] BUG: Parse two date columns broken in read_csv with multiple headers1 parent b3ae4c7 commit fb7dc7d
File tree
3 files changed
+21
-1
lines changed- doc/source/whatsnew
- pandas
- io
- tests/io/parser
3 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2858 | 2858 | | |
2859 | 2859 | | |
2860 | 2860 | | |
2861 | | - | |
| 2861 | + | |
2862 | 2862 | | |
2863 | 2863 | | |
2864 | 2864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
0 commit comments