Answers for "how to open ndjson file in python"

0

how to open ndjson file in python

import ujson as json
import pandas as pd

path = "to/dir/of/file.ndjson"

records = map(json.loads, open(path, encoding="utf8"))
df = pd.DataFrame.from_records(records)
Posted by: Guest on May-09-2021

Code answers related to "how to open ndjson file in python"

Python Answers by Framework

Browse Popular Code Answers by Language