Pandas – ValueError: If using all scalar values, you must pass an index

Posted Leave a commentPosted in Pandas, Python

Reading json file using Pandas read_json can fail with “ValueError: If using all scalar values, you must pass an index”. Let see with an example – cat a.json { “creator”: “CaptainAmerica”, “last_modifier”: “NickFury”, “title”: “Captain America: The First Avenger”, “view_count”: 12000 } >>> import pandas as pd >>> import glob >>> for f in glob.glob(‘*.json’): […]