Skip to content

Commit 316f850

Browse files
author
MomIsBestFriend
committed
Fixed lint issues
1 parent 4b90c82 commit 316f850

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas/core/generic.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,9 @@ def to_json(
22122212
... )
22132213
22142214
>>> df.to_json(orient='split')
2215-
'{"columns":["col 1","col 2"],"index":["row 1","row 2"],"data":[["a","b"],["c","d"]]}'
2215+
'{"columns":["col 1","col 2"],\
2216+
"index":["row 1","row 2"],\
2217+
"data":[["a","b"],["c","d"]]}'
22162218
22172219
Encoding/decoding a Dataframe using ``'records'`` formatted JSON.
22182220
Note that index labels are not preserved with this encoding.
@@ -2238,7 +2240,11 @@ def to_json(
22382240
Encoding with Table Schema
22392241
22402242
>>> df.to_json(orient='table')
2241-
'{"schema":{"fields":[{"name":"index","type":"string"},{"name":"col 1","type":"string"},{"name":"col 2","type":"string"}],"primaryKey":["index"],"pandas_version":"0.20.0"},"data":[{"index":"row 1","col 1":"a","col 2":"b"},{"index":"row 2","col 1":"c","col 2":"d"}]}'
2243+
'{"schema":{"fields":[{"name":"index","type":"string"},\
2244+
{"name":"col 1","type":"string"},{"name":"col 2","type":"string"}],\
2245+
"primaryKey":["index"],"pandas_version":"0.20.0"},\
2246+
"data":[{"index":"row 1","col 1":"a","col 2":"b"},\
2247+
{"index":"row 2","col 1":"c","col 2":"d"}]}'
22422248
"""
22432249
from pandas.io import json
22442250

0 commit comments

Comments
 (0)