(Oct-09-2022, 07:39 AM)rob101 Wrote: Okay, so the jason file has yet to be translated; I'll work on that.
What about:
with open ('df.jason', 'r') as f: content = f.read() temp = content.split(',') for item in temp: if 'amount' in item: amount = item.strip() elif 'email' in item: email = item.strip() elif 'mobile' in item: mobile = item.strip() elif 'accountOwner' in item: accountOwner = item.strip() print(amount,email,mobile,accountOwner)
Output:"amount":300 "email":"[email protected]" "mobile":"100000012457" "accountOwner":"Tom Hank"
In three million data it prints out only one line of data
It looks like it's printing out the last line of the file