-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: cleanup docstring for read_json and fix error in contribution guide #27280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
d544f7b
dd1492e
a92642d
aa0c36e
90174da
5c8ed18
37c132c
b089b2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -355,9 +355,9 @@ def read_json( | |||||
path_or_buf : a valid JSON string or file-like, default: None | ||||||
The string could be a URL. Valid URL schemes include http, ftp, s3, | ||||||
gcs, and file. For file URLs, a host is expected. For instance, a local | ||||||
file could be ``file://localhost/path/to/table.json`` | ||||||
file could be ``file://localhost/path/to/table.json``. | ||||||
|
||||||
orient : string, | ||||||
orient : str, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the preferred change, according to the docs, would be |
||||||
Indication of expected JSON string format. | ||||||
Compatible JSON strings can be produced by ``to_json()`` with a | ||||||
corresponding orient value. | ||||||
|
@@ -394,7 +394,8 @@ def read_json( | |||||
'table' as an allowed value for the ``orient`` argument | ||||||
|
||||||
typ : type of object to recover (series or frame), default 'frame' | ||||||
dtype : boolean or dict, default None | ||||||
|
||||||
dtype : bool or dict, default None | ||||||
If True, infer dtypes; if a dict of column to dtype, then use those; | ||||||
if False, then don't infer dtypes at all, applies only to the data. | ||||||
|
||||||
|
@@ -404,7 +405,7 @@ def read_json( | |||||
|
||||||
Not applicable for ``orient='table'``. | ||||||
|
||||||
convert_axes : boolean, default None | ||||||
convert_axes : bool, default None | ||||||
Try to convert the axes to the proper dtypes. | ||||||
|
||||||
For all ``orient`` values except ``'table'``, default is True. | ||||||
|
@@ -413,9 +414,9 @@ def read_json( | |||||
|
||||||
Not applicable for ``orient='table'``. | ||||||
|
||||||
convert_dates : boolean, default True | ||||||
List of columns to parse for dates; If True, then try to parse | ||||||
datelike columns default is True; a column label is datelike if | ||||||
convert_dates : bool or list, default True | ||||||
List of columns to parse for dates. If True, then try to parse | ||||||
datelike columns. A column label is datelike if | ||||||
|
||||||
* it ends with ``'_at'``, | ||||||
|
||||||
|
@@ -425,34 +426,38 @@ def read_json( | |||||
|
||||||
* it is ``'modified'``, or | ||||||
|
||||||
* it is ``'date'`` | ||||||
* it is ``'date'``. | ||||||
|
||||||
keep_default_dates : bool, default True | ||||||
If parsing dates, then parse the default datelike columns. | ||||||
|
||||||
keep_default_dates : boolean, default True | ||||||
If parsing dates, then parse the default datelike columns | ||||||
numpy : boolean, default False | ||||||
numpy : bool, default False | ||||||
Direct decoding to numpy arrays. Supports numeric data only, but | ||||||
non-numeric column and index labels are supported. Note also that the | ||||||
JSON ordering MUST be the same for each term if numpy=True. | ||||||
precise_float : boolean, default False | ||||||
|
||||||
precise_float : bool, default False | ||||||
Set to enable usage of higher precision (strtod) function when | ||||||
decoding string to double values. Default (False) is to use fast but | ||||||
less precise builtin functionality | ||||||
date_unit : string, default None | ||||||
less precise builtin functionality. | ||||||
|
||||||
date_unit : str, default None | ||||||
The timestamp unit to detect if converting dates. The default behaviour | ||||||
is to try and detect the correct precision, but if this is not desired | ||||||
then pass one of 's', 'ms', 'us' or 'ns' to force parsing only seconds, | ||||||
milliseconds, microseconds or nanoseconds respectively. | ||||||
|
||||||
encoding : str, default is 'utf-8' | ||||||
The encoding to use to decode py3 bytes. | ||||||
|
||||||
.. versionadded:: 0.19.0 | ||||||
|
||||||
lines : boolean, default False | ||||||
lines : bool, default False | ||||||
Read the file as a json object per line. | ||||||
|
||||||
.. versionadded:: 0.19.0 | ||||||
|
||||||
chunksize : integer, default None | ||||||
chunksize : int, default None | ||||||
Return JsonReader object for iteration. | ||||||
See the `line-delimited json docs | ||||||
<http://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#line-delimited-json>`_ | ||||||
|
@@ -473,7 +478,7 @@ def read_json( | |||||
|
||||||
Returns | ||||||
------- | ||||||
result : Series or DataFrame, depending on the value of `typ`. | ||||||
Series or DataFrame, depending on the value of `typ`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our standard is to leave just the type There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do. |
||||||
|
||||||
See Also | ||||||
-------- | ||||||
TomAugspurger marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
Uh oh!
There was an error while loading. Please reload this page.