Last active
July 8, 2020 23:24
-
-
Save zmaas/01f767eff62797ffc2d64b087909b252 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Necessary dependencies | |
import json | |
import pandas as pd # Not installed by default, might need to be pip | |
# installed. | |
# There are a few ways to do this, and this is certainly not the most | |
# efficient, but it will work. | |
with open('json_file_path.json', 'r') as json_file_handle: | |
df = pd.DataFrame( # Load the array into the dataframe | |
json.loads( # Load the array as JSON | |
json_file_handle.read() # Read the whole file at once | |
)["items"] # Take the array of items | |
) | |
# df is the name of your dataframe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment