📜  如何在 python 代码示例中打开 ndjson 文件

📅  最后修改于: 2022-03-11 14:45:48.101000             🧑  作者: Mango

代码示例1
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)