-- numpy : direct decoding to numpy arrays. default True but falls back to standard decoding if a problem occurs.
-- parse_dates : a list of columns to parse for dates; If True, then try to parse datelike columns, default is False
+- 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
+- convert_axes : boolean, try to convert the axes to the proper dtypes, default is True
+- convert_dates : a list of columns to parse for dates; If True, then try to parse datelike columns, default is True
- keep_default_dates : boolean, default True. If parsing dates, then parse the default datelike columns
+- numpy: direct decoding to numpy arrays. default is False;
+ Note that the JSON ordering **MUST** be the same for each term if ``numpy=True``
The parser will raise one of ``ValueError/TypeError/AssertionError`` if the JSON is
not parsable.
+The default of ``convert_axes=True``, ``dtype=True``, and ``convert_dates=True`` will try to parse the axes, and all of the data
+into appropriate types, including dates. If you need to override specific dtypes, pass a dict to ``dtype``. ``convert_axes`` should only
+be set to ``False`` if you need to preserve string-like numbers (e.g. '1', '2') in an axes.
+
+.. warning::
+
+ When reading JSON data, automatic coercing into dtypes has some quirks:
+
+ * an index can be in a different order, that is the returned order is not guaranteed to be the same as before serialization
+ * a column that was ``float`` data can safely be converted to ``integer``, e.g. a column of ``1.``
+ * bool columns will be converted to ``integer`` on reconstruction
+
+ Thus there are times where you may want to specify specific dtypes via the ``dtype`` keyword argument.
+
Reading from a JSON string
.. ipython:: python
pd.read_json(json)
-Reading from a file, parsing dates
+Reading from a file
+
+.. ipython:: python
+
+ pd.read_json('test.json')
+
+Don't convert any data (but still convert axes and dates)