Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fahadsiddiqui committed Sep 21, 2020
1 parent b96dc54 commit 1fd604c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions petl/io/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,17 @@ def fromjson(source, *args, **kwargs):
223
>>> table2 = etl.fromjson('example2.json', lines=True)
>>> table2
+---------+-------------------------------------------+
| name | wins |
+=========+===========================================+
+-----------+-------------------------------------------+
| name | wins |
+===========+===========================================+
| 'Gilbert' | [['straight', '7S'], ['one pair', '10H']] |
+---------+-------------------------------------------+
+-----------+-------------------------------------------+
| 'Alexa' | [['two pair', '4S'], ['two pair', '9S']] |
+---------+-------------------------------------------+
+-----------+-------------------------------------------+
| 'May' | [] |
+---------+-------------------------------------------+
+-----------+-------------------------------------------+
| 'Deloise' | [['three of a kind', '5S']] |
+---------+-------------------------------------------+
+-----------+-------------------------------------------+
If your JSON file does not fit this structure, you will need to parse it
via :func:`json.load` and select the array to treat as the data, see also
Expand Down

0 comments on commit 1fd604c

Please sign in to comment.