You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/io.rst
+30-11
Original file line number
Diff line number
Diff line change
@@ -954,13 +954,21 @@ with optional parameters:
954
954
955
955
- path_or_buf : the pathname or buffer to write the output
956
956
This can be ``None`` in which case a JSON string is returned
957
-
- orient : The format of the JSON string, default is ``index`` for ``Series``, ``columns`` for ``DataFrame``
957
+
- orient :
958
958
959
-
* split : dict like {index -> [index], columns -> [columns], data -> [values]}
960
-
* records : list like [{column -> value}, ... , {column -> value}]
961
-
* index : dict like {index -> {column -> value}}
962
-
* columns : dict like {column -> {index -> value}}
963
-
* values : just the values array
959
+
Series :
960
+
default is 'index', allowed values are: {'split','records','index'}
961
+
962
+
DataFrame :
963
+
default is 'columns', allowed values are: {'split','records','index','columns','values'}
964
+
965
+
The format of the JSON string
966
+
967
+
* split : dict like {index -> [index], columns -> [columns], data -> [values]}
968
+
* records : list like [{column -> value}, ... , {column -> value}]
969
+
* index : dict like {index -> {column -> value}}
970
+
* columns : dict like {column -> {index -> value}}
971
+
* values : just the values array
964
972
965
973
- date_format : type of date conversion (epoch = epoch milliseconds, iso = ISO8601), default is epoch
966
974
- double_precision : The number of decimal places to use when encoding floating point values, default 10.
@@ -1007,17 +1015,28 @@ is ``None``. To explicity force ``Series`` parsing, pass ``typ=series``
1007
1015
is expected. For instance, a local file could be
1008
1016
file ://localhost/path/to/table.json
1009
1017
- typ : type of object to recover (series or frame), default 'frame'
1010
-
- orient : The format of the JSON string, one of the following
1018
+
- orient :
1019
+
1020
+
Series :
1021
+
default is 'index', allowed values are: {'split','records','index'}
1022
+
1023
+
DataFrame :
1024
+
default is 'columns', allowed values are: {'split','records','index','columns','values'}
1025
+
1026
+
The format of the JSON string
1011
1027
1012
-
* split : dict like {index -> [index], name -> name, data -> [values]}
1013
-
* records : list like [value, ... , value]
1014
-
* index : dict like {index -> value}
1028
+
* split : dict like {index -> [index], columns -> [columns], data -> [values]}
1029
+
* records : list like [{column -> value}, ... , {column -> value}]
1030
+
* index : dict like {index -> {column -> value}}
1031
+
* columns : dict like {column -> {index -> value}}
1032
+
* values : just the values array
1015
1033
1016
1034
- dtype : if True, infer dtypes, if a dict of column to dtype, then use those, if False, then don't infer dtypes at all, default is True, apply only to the data
1017
1035
- convert_axes : boolean, try to convert the axes to the proper dtypes, default is True
1018
1036
- convert_dates : a list of columns to parse for dates; If True, then try to parse datelike columns, default is True
1019
1037
- keep_default_dates : boolean, default True. If parsing dates, then parse the default datelike columns
1020
-
- numpy: direct decoding to numpy arrays. default True but falls back to standard decoding if a problem occurs.
1038
+
- numpy: direct decoding to numpy arrays. default is False;
1039
+
Note that the JSON ordering **MUST** be the same for each term if ``numpy=True``
1021
1040
1022
1041
The parser will raise one of ``ValueError/TypeError/AssertionError`` if the JSON is
0 commit comments