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
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1466,6 +1466,7 @@ with optional parameters:
1466
1466
- ``force_ascii`` : force encoded string to be ASCII, default True.
1467
1467
- ``date_unit`` : The time unit to encode to, governs timestamp and ISO8601 precision. One of 's', 'ms', 'us' or 'ns' for seconds, milliseconds, microseconds and nanoseconds respectively. Default 'ms'.
1468
1468
- ``default_handler`` : The handler to call if an object cannot otherwise be converted to a suitable format for JSON. Takes a single argument, which is the object to convert, and returns a serializable object.
1469
+
- ``lines`` : If ``records`` orient, then will write each record per line as json.
1469
1470
1470
1471
Note ``NaN``'s, ``NaT``'s and ``None`` will be converted to ``null`` and ``datetime`` objects will be converted based on the ``date_format`` and ``date_unit`` parameters.
1471
1472
@@ -1656,6 +1657,8 @@ is ``None``. To explicitly force ``Series`` parsing, pass ``typ=series``
1656
1657
None. By default the timestamp precision will be detected, if this is not desired
1657
1658
then pass one of 's', 'ms', 'us' or 'ns' to force timestamp precision to
1658
1659
seconds, milliseconds, microseconds or nanoseconds respectively.
1660
+
- ``lines`` : reads file as one json object per line.
1661
+
- ``encoding`` : The encoding to use to decode py3 bytes.
1659
1662
1660
1663
The parser will raise one of ``ValueError/TypeError/AssertionError`` if the JSON is not parseable.
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.19.0.txt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -325,6 +325,7 @@ Other enhancements
325
325
326
326
.. _whatsnew_0190.api:
327
327
328
+
328
329
API changes
329
330
~~~~~~~~~~~
330
331
@@ -344,7 +345,7 @@ API changes
344
345
- ``PeriodIndex.fillna`` with ``Period`` has different freq now coerces to ``object`` dtype (:issue:`13664`)
345
346
- More informative exceptions are passed through the csv parser. The exception type would now be the original exception type instead of ``CParserError``. (:issue:`13652`)
346
347
- ``astype()`` will now accept a dict of column name to data types mapping as the ``dtype`` argument. (:issue:`12086`)
347
-
348
+
- The ``pd.read_json`` and ``DataFrame.to_json`` has gained support for reading and writing json lines with ``lines`` option see :ref:`Line delimited json <io.jsonl>` (:issue:`9180`)
0 commit comments