read_json()

Pandas Json

Read and display data from json file.
import pandas as pd 
my_data=pd.read_json("student.json")
print(my_data)
Output is here
    class  id  mark         name     sex
0    Four   1    75     John Deo  female
1   Three   2    85     Max Ruin    male
2   Three   3    55       Arnold    male
3    Four   4    60   Krish Star  female
4    Four   5    60    John Mike  female
------------
------------
This will read the data from json file ( in same directory ) student.json
We can read the URL also.
import pandas as pd 
my_data=pd.read_json("https://www.plus2net.com/php_tutorial/student.json")
print(my_data)
It can be your localhost also.
import pandas as pd 
my_data=pd.read_json("http://127.0.0.1/student.json")
print(my_data)
Pandas read_csv() to_csv() to_excel()
Data input and output from Pandas DataFrame


plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer