Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
 
PREVIOUS NEXT
Tagged: #open #ndjson #file #python
ADD COMMENT
Topic
Name
8+1 =