0

I have tried the code below but it's not working

import json
with open("/Users/elton/20210228test2.ndjson") as f:
    test2data = ndjson.load(f)
buran
  • 13,682
  • 10
  • 36
  • 61

1 Answers1

0

This works for me. import ndjson instead of import json. See more here: https://pypi.org/project/ndjson/

import ndjson

# load from file-like objects
with open('data.ndjson') as f:
    data = ndjson.load(f)
vojtam
  • 1,157
  • 9
  • 34