ENH: Extending the orient="table"
option to all Table Schema types
#55038
Labels
orient="table"
option to all Table Schema types
#55038
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
The
orient="table"
option of the JSON interface enforces the TableSchema specification but only partially.The table below shows the deviations from the specification:
Data type
format
type
Specification
orient=’table’
read_json
orient=’table’
Feature Description
proposal
To have a simple and reversible solution which respect the TableSchema specification, I propose to add an 'External Type' (as defined in some JSON export e.g.
"ExtDtype":"Float32"
).This External Type (NTVtype) can be added to the name of DataFrame Columns following NTV format (as defined in Internet-Draft).
This proposal is included in the PDEP-0012
The table below shows the correspondence between TableSchema format / type and pandas NTVtype / dtype:
Note:
Issues
The proposal resolves or provides an alternative solution for the following issues: #12997, #14358, #16492, #35420, #35464, #36211, #39537, #49585, #50782, #51375, #52595, #53252
Examples
JSON representation
Alternative Solutions
The alternative solutions are to add a new pandas attribute
ext_type
or to extend thedtype
asNTVtype
.Those solutions have important impacts.
Additional Context
-> NTV repository : https://github.com/loco-philippe/NTV
-> PDEP-0012
The text was updated successfully, but these errors were encountered: