Load JSON String into Pandas DataFrame Last Updated : 18 Aug, 2020 Improve Improve Like Article Like Save Share Report Let us see how can we use a dataset in JSON format in our Pandas DataFrame. This can be done using the built-in read_json() function. It enables us to read the JSON in a Pandas DataFrame. Example : Consider the JSON file path_to_json.json : path_to_json.json # importing the module import pandas # reading the file data = df.read_json("path_to_json.json") # displaying the DataFrame print(data) Output : Now, the final data frame also depends on the type of the JSON file. So there are mainly 3 types of orientations in JSON : Index Oriented Value-Oriented Column Oriented 1. Index Oriented This is an example of an Index Oriented JSON file. # importing the module import pandas # reading the file data = df.read_json("sample.json") # displaying the DataFrame print(data) Output : 2. Value-Oriented This is an example of a Value-Oriented JSON file. # importing the module import pandas # reading the file data = df.read_json("sample.json") # displaying the DataFrame print(data) Output : 3. Column Oriented This is an example of a Column-oriented JSON file. # importing the module import pandas # reading the file data = df.read_json("sample.json") # displaying the DataFrame print(data) Output : Like Article Suggest improvement Previous How to Filter DataFrame Rows Based on the Date in Pandas? Next How to display most frequent value in a Pandas series? Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads How to load a TSV file into a Pandas DataFrame? Python - Difference Between json.load() and json.loads() How to convert pandas DataFrame into JSON in Python? Normalizing Nested Json Object Into Pandas Dataframe Convert given Pandas series into a dataframe with its index as another column on the dataframe Exporting Pandas DataFrame to JSON File Python Pandas Dataframe To Nested Json Pandas Convert JSON to DataFrame Split a String into columns using regex in pandas DataFrame Difference Between Spark DataFrame and Pandas DataFrame Like ayushmankumar7 Follow Article Tags : Python pandas-dataFrame Python Pandas-exercise Python-pandas Python Practice Tags : python