I found a quick and easy solution to what I wanted using json_normalize() included in pandas 1.01.

from urllib2 import Request, urlopen
import json

import pandas as pd    

path1 = '42.974049,-81.205203|42.974298,-81.195755'
request=Request('http://maps.googleapis.com/maps/api/elevation/json?locations='+path1+'&sensor=false')
response = urlopen(request)
elevations = response.read()
data = json.loads(elevations)
df = pd.json_normalize(data['results'])

This gives a nice flattened dataframe with the json data that I got from the Google Maps API.

Answer from pbreach on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ pandas โ€บ pandas_json.asp
Pandas Read JSON
JSON is plain text, but has the ... will be using a JSON file called 'data.json'. Open data.json. ... Tip: use to_string() to print the entire DataFrame....
Discussions

Convert Pandas DataFrame to JSON format - Stack Overflow
I have a Pandas DataFrame with two columns โ€“ one with the filename and one with the hour in which it was generated: File Hour F1 1 F1 2 F2 1 F3 1 I am More on stackoverflow.com
๐ŸŒ stackoverflow.com
Python pandas: convert a list of JSON strings into a dataframe. How do I do that?
Start here: https://pandas.pydata.org/docs/reference/api/pandas.json_normalize.html More on reddit.com
๐ŸŒ r/learnpython
9
3
April 4, 2023
python - How to read a json data into a dataframe using pandas - Stack Overflow
Each key value pairs will be a row in the dataframe and I need to need headers "Sentence" and "Label". I tried with using lines = True but it returns all the key-value pairs in one row. data_df = pd.read_json(PATH_TO_DATA, lines = True) More on stackoverflow.com
๐ŸŒ stackoverflow.com
Python - How to convert JSON File to Dataframe - Stack Overflow
Communities for your favorite technologies. Explore all Collectives ยท Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ pandas โ€บ pandas-convert-json-to-dataframe
Convert JSON to Pandas DataFrame - GeeksforGeeks
July 23, 2025 - Pandas, a powerful data manipulation library in Python, provides a convenient way to convert JSON data into a Pandas data frame. In this article, we'll explore how to convert JSON data into a Pandas DataFrame, covering various scenarios and options you might encounter along the way.
๐ŸŒ
KDnuggets
kdnuggets.com โ€บ how-to-convert-json-data-into-a-dataframe-with-pandas
How to Convert JSON Data into a DataFrame with Pandas - KDnuggets
This will convert it into a Python dictionary, and we can then create the DataFrame directly from the resulting Python data structure. However, it has a problem - it can only handle single nested data. So, for the above case, if you only use these steps with this code: import json import pandas as pd #Load the JSON data with open('books.json','r') as f: data = json.load(f) #Create a DataFrame from the JSON data df = pd.DataFrame(data['books']) df
Find elsewhere
๐ŸŒ
Data to Fish
datatofish.com โ€บ export-pandas-dataframe-json
How to Export a pandas DataFrame as a JSON File
import pandas as pd data = {'fish': ['salmon', 'pufferfish', 'shark'], 'count': [100, 10, 1], } df = pd.DataFrame(data) print(df) ... import os desktop_path = os.path.expanduser('~/Desktop') df.to_json(desktop_path + '/fish.json', orient='columns')
๐ŸŒ
Python Basics
pythonbasics.org โ€บ pandas-json
JSON with Python Pandas - Python Tutorial
You can use the example above to create a json file, then use this example to load it into a dataframe. ... If the extension is .gz, .bz2, .zip, and .xz, the corresponding compression method is automatically selected. In the next example, you load data from a csv file into a dataframe, that you can then save as json file.
๐ŸŒ
Spark By {Examples}
sparkbyexamples.com โ€บ home โ€บ pandas โ€บ pandas convert json to dataframe
Pandas Convert JSON to DataFrame - Spark By {Examples}
July 3, 2025 - You can convert JSON to pandas DataFrame by using json_normalize(), read_json() and from_dict() functions. Some of these methods are also used to extract data from JSON files and store them as DataFrame. JSON stands for JavaScript object notation.
๐ŸŒ
Spark By {Examples}
sparkbyexamples.com โ€บ home โ€บ pandas โ€บ pandas read json file with examples
Pandas Read JSON File with Examples - Spark By {Examples}
January 10, 2025 - In this article, I will explain how to read JSON from string and file into pandas DataFrame and also use several optional params with examples.
๐ŸŒ
Hevo
hevodata.com โ€บ home โ€บ learn โ€บ data strategy
A Simplified Guide to Pandas Load JSON: 3 Essential Steps
January 9, 2026 - In this section of the Pandas Load JSON guide, we discuss the many ways to create a Dataframe using Pandas.
๐ŸŒ
Python Forum
python-forum.io โ€บ thread-39304.html
Converting a json file to a dataframe with rows and columns
Hey all, I am trying to convert a json file into a dataframe. import pandas as pd import os from pandas.io.json import json_normalize data = [] path_to_json = '/Users/macbook/Desktop/Saveddata' json_files = [pos_json for pos_json in os.listdir...
๐ŸŒ
Pandas
pandas.pydata.org โ€บ docs โ€บ reference โ€บ api โ€บ pandas.read_json.html
pandas.read_json โ€” pandas 3.0.1 documentation - PyData |
This method reads JSON files or JSON-like data and converts them into pandas objects. It supports a variety of input formats, including line-delimited JSON, compressed files, and various data representations (table, records, index-based, etc.).
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-read-json-files-with-pandas
How to Read JSON Files with Pandas? - GeeksforGeeks
July 23, 2025 - Reading JSON files using Pandas ... read Json file using Pandas Some of them are: ... The pd.read_json() function helps to read JSON data directly into a DataFrame....
๐ŸŒ
Saturn Cloud
saturncloud.io โ€บ blog โ€บ python-pandas-json-to-dataframe
Python Pandas Json to DataFrame | Saturn Cloud Blog
February 3, 2024 - In this article, we will discuss the process of converting JSON data to a Pandas DataFrame using Pythonโ€™s Pandas library.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ pandas โ€บ exercise.asp
W3Schools PANDAS Exercise
Exercise 1 Exercise 2 Exercise 3 Exercise 4 Exercise 5 Exercise 6 Exercise 7 Exercise 8 Exercise 9Go to PANDAS DataFrame Tutorial