How do I open a json file and turn it into a dataframe? I want to create graphs with Plotly later but I cannot seem to create a dataframe.
def open_file(filename):
with open(filename, "r") as file:
file_list = json.load(file)
output_df = pd.DataFrame(file_list)
return output_df
open_file("LT.json")
The error I get:
ValueError("DataFrame constructor not properly called!")
pandas.read_json.