ENH: automatically detect orient= for read_json if not supplied #52713
Labels
Enhancement
IO JSON
read_json, to_json, json_normalize
Needs Discussion
Requires discussion from core team before further action
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
We'd love for Pandas to automatically detect what
orient=
should be forread_json
if the orient was 'table' or 'split' and the argument wasn't supplied (seems unsupported as of 2.0.0).Feature Description
For example, this would ideally not throw "ValueError: Mixing dicts with non-Series may lead to ambiguous ordering.", and instead work as if
orient='table'
was supplied toread_json
:Alternative Solutions
I'm sorry but I'm not much of a programmer and wouldn't know where to begin designing a solution. Some except block that
try
s on the ValueError?Additional Context
This isn't a huge problem but it recently caused several beginners many headaches and would be a subtle improvement to Pandas overall. If this is an easy fix then great, otherwise sorry for the dumb suggestion!
The text was updated successfully, but these errors were encountered: