pd.read_json('data.json') args 1

pd.read_json(‘data.json’) args

import json
import pandas as pd
with open('C:/Users/Alberto/nutrients.json', 'r') as f:
    data = json.load(f)
df = pd.DataFrame(data)

Here is what the above code is Doing:
1. Open the file
2. Load the file into a variable called data
3. Create a dataframe from the data variable

Similar Posts