Skip to content

Commit d7fd7ca

Browse files
committed
Merge pull request #3930 from cpcloud/json-docstring-fix
DOC: fix to_json docstring nesting issue
2 parents 70fe0a2 + f475eef commit d7fd7ca

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

pandas/core/generic.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -539,25 +539,27 @@ def to_json(self, path_or_buf=None, orient=None, date_format='epoch',
539539
----------
540540
path_or_buf : the path or buffer to write the result string
541541
if this is None, return a StringIO of the converted string
542-
orient :
542+
orient : string
543543
544-
Series :
545-
default is 'index'
546-
allowed values are: {'split','records','index'}
544+
* Series
547545
548-
DataFrame :
549-
default is 'columns'
550-
allowed values are: {'split','records','index','columns','values'}
546+
- default is 'index'
547+
- allowed values are: {'split','records','index'}
551548
552-
The format of the JSON string
553-
split : dict like
554-
{index -> [index], columns -> [columns], data -> [values]}
555-
records : list like [{column -> value}, ... , {column -> value}]
556-
index : dict like {index -> {column -> value}}
557-
columns : dict like {column -> {index -> value}}
558-
values : just the values array
549+
* DataFrame
559550
560-
date_format : type of date conversion (epoch = epoch milliseconds, iso = ISO8601),
551+
- default is 'columns'
552+
- allowed values are: {'split','records','index','columns','values'}
553+
554+
* The format of the JSON string
555+
556+
- split : dict like {index -> [index], columns -> [columns], data -> [values]}
557+
- records : list like [{column -> value}, ... , {column -> value}]
558+
- index : dict like {index -> {column -> value}}
559+
- columns : dict like {column -> {index -> value}}
560+
- values : just the values array
561+
562+
date_format : type of date conversion (epoch = epoch milliseconds, iso = ISO8601)
561563
default is epoch
562564
double_precision : The number of decimal places to use when encoding
563565
floating point values, default 10.

0 commit comments

Comments
 (0)