Skip to content

Conversation

@phofl
Copy link
Member

@phofl phofl commented Nov 26, 2023

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.


new_data = data

if new_data.dtype == "string":
Copy link
Member

Choose a reason for hiding this comment

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

Should this include ArrowDtype[string]?

Copy link
Member Author

@phofl phofl Nov 27, 2023

Choose a reason for hiding this comment

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

No that shouldn't be necessary, you can't end up with arrow strings in columns that could be dates, that can only happen with the automatic conversion when the infer string option is set

@mroeschke mroeschke added IO JSON read_json, to_json, json_normalize Strings String extension data type and string data labels Nov 27, 2023
@mroeschke mroeschke added this to the 2.2 milestone Nov 27, 2023
@mroeschke mroeschke merged commit f6eee83 into pandas-dev:main Nov 27, 2023
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the json_convert_data branch November 27, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO JSON read_json, to_json, json_normalize Strings String extension data type and string data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants