@@ -400,8 +400,10 @@ def read_json(
400
400
.. versionadded:: 0.23.0
401
401
'table' as an allowed value for the ``orient`` argument
402
402
403
- typ : type of object to recover (series or frame), default 'frame'
404
- dtype : boolean or dict, default None
403
+ typ : {'frame', 'series'}, default 'frame'
404
+ The type of object to recover.
405
+
406
+ dtype : bool or dict, default None
405
407
If True, infer dtypes; if a dict of column to dtype, then use those;
406
408
if False, then don't infer dtypes at all, applies only to the data.
407
409
@@ -411,7 +413,7 @@ def read_json(
411
413
412
414
Not applicable for ``orient='table'``.
413
415
414
- convert_axes : boolean , default None
416
+ convert_axes : bool , default None
415
417
Try to convert the axes to the proper dtypes.
416
418
417
419
For all ``orient`` values except ``'table'``, default is True.
@@ -420,9 +422,9 @@ def read_json(
420
422
421
423
Not applicable for ``orient='table'``.
422
424
423
- convert_dates : boolean , default True
424
- List of columns to parse for dates; If True, then try to parse
425
- datelike columns default is True; a column label is datelike if
425
+ convert_dates : bool or list of str , default True
426
+ List of columns to parse for dates. If True, then try to parse
427
+ datelike columns. A column label is datelike if
426
428
427
429
* it ends with ``'_at'``,
428
430
@@ -432,34 +434,38 @@ def read_json(
432
434
433
435
* it is ``'modified'``, or
434
436
435
- * it is ``'date'``
437
+ * it is ``'date'``.
438
+
439
+ keep_default_dates : bool, default True
440
+ If parsing dates, then parse the default datelike columns.
436
441
437
- keep_default_dates : boolean, default True
438
- If parsing dates, then parse the default datelike columns
439
- numpy : boolean, default False
442
+ numpy : bool, default False
440
443
Direct decoding to numpy arrays. Supports numeric data only, but
441
444
non-numeric column and index labels are supported. Note also that the
442
445
JSON ordering MUST be the same for each term if numpy=True.
443
- precise_float : boolean, default False
446
+
447
+ precise_float : bool, default False
444
448
Set to enable usage of higher precision (strtod) function when
445
449
decoding string to double values. Default (False) is to use fast but
446
- less precise builtin functionality
447
- date_unit : string, default None
450
+ less precise builtin functionality.
451
+
452
+ date_unit : str, default None
448
453
The timestamp unit to detect if converting dates. The default behaviour
449
454
is to try and detect the correct precision, but if this is not desired
450
455
then pass one of 's', 'ms', 'us' or 'ns' to force parsing only seconds,
451
456
milliseconds, microseconds or nanoseconds respectively.
457
+
452
458
encoding : str, default is 'utf-8'
453
459
The encoding to use to decode py3 bytes.
454
460
455
461
.. versionadded:: 0.19.0
456
462
457
- lines : boolean , default False
463
+ lines : bool , default False
458
464
Read the file as a json object per line.
459
465
460
466
.. versionadded:: 0.19.0
461
467
462
- chunksize : integer, default None
468
+ chunksize : int, optional
463
469
Return JsonReader object for iteration.
464
470
See the `line-delimited json docs
465
471
<http://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#line-delimited-json>`_
@@ -480,11 +486,13 @@ def read_json(
480
486
481
487
Returns
482
488
-------
483
- result : Series or DataFrame, depending on the value of `typ`.
489
+ Series or DataFrame
490
+ The type returned depends on the value of `typ`.
484
491
485
492
See Also
486
493
--------
487
- DataFrame.to_json
494
+ DataFrame.to_json : Convert a DataFrame to a JSON string.
495
+ Series.to_json : Convert a Series to a JSON string.
488
496
489
497
Notes
490
498
-----
0 commit comments