Last Updated on August 14, 2022 by shibatau
I. What will we learn?
We will learn how to read a JSON file and handle it with Class and Object.
II. Reading a sample CSV data set and save it as a JSON file with PANDAS
Here are the scripts:
# read CSV RAW data as a data framw with pandas df = pd.read_csv('/content/sampleEnglishJapanesYerar2.csv') #save it as a jason file df.to_jason('english_japanese.json') # load the json file and read it as a dictionary import json with open("/content/english_japanese.json", "r") as rf: decoded_data = json.load(rf)
Now show the dictionary:
You can handle the dictionary in a usual way:
You can see the scripts on Google Colaboratory:
III. Creating an Object
Not completed yet.