pandas Read JSON from file


Example

Content of file.json (one JSON object per line):

{"A": 1, "B": 2}
{"A": 3, "B": 4}

How to read directly from a local file:

pd.read_json('file.json', lines=True)
# Output:
#    A  B
# 0  1  2
# 1  3  4