Skip to content

Conversation

phofl
Copy link
Member

@phofl phofl commented Feb 18, 2022

@phofl phofl added the IO CSV read_csv, to_csv label Feb 18, 2022

try_num_bool = not (cast_type and is_string_dtype(cast_type))
conv = False
if isinstance(converters, dict) and self.index_names is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could combine with the above check as if self.index_names is not None: first and then the 2 isinstance(arg, dict) checks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, this looks better, also renamed the variable

@mroeschke mroeschke added this to the 1.5 milestone Feb 22, 2022
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jreback jreback merged commit 7ee8ab0 into pandas-dev:main Feb 26, 2022
@jreback
Copy link
Contributor

jreback commented Feb 26, 2022

very nice @phofl

@phofl phofl deleted the 40589 branch June 6, 2022 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: converters of dtype is ignored in read_csv if related to index column
3 participants