|

Quick Example and Walk-Through JSON with Python

This is a quick to create a dictionary object , write it to a JSON file and then read back the file and convert it to a dictionary and access the items in the dictionary.

Credit to : codebasics.  You can check him out on Youtube

In [3]:

 

In [6]:

 

Out[6]:
In [14]:

 

In [15]:

 

Out[15]:
In [16]:

 

Out[16]:
In [18]:

 

In [19]:

 

Out[19]:
In [20]:

 

Out[20]:
In [21]:

 

Out[21]:
In [22]:

 

Out[22]:
In [30]:

 

Hope it helps

 

Want more information like this?

Similar Posts

  • Python Pandas Groupby function agg Series GroupbyObject

    Group By FunctionThis is a quick look at Python groupby function. Very powerful and useful function. We will take a simple look at it here. Credits to Data School , creator of Python course materials. lets import sample dataset In [18]:

      In [19]:

      In [20]:

      Out[20]: country beer_servings spirit_servings wine_servings total_litres_of_pure_alcohol continent…

  • |

    Writing About The Data – Data Analysis and Intrepretation

    OVERVIEW My research work deals with Ghana, a country from the Gapminder dataset and there are 5 main variables I have been working with so I will be looking at the sample, procedure and measures for these 5 variables. The variables are: i.      Incomeperperson (Income Per Person) ii.    literacyrate (Literacy  Rate) iii.   lifeexpectancy  (Life…

  • | |

    Testing a Basic Linear Regression Model – Data Analysis and Intrepretation

    Testing a Basic Linear Regression Model Background My research work deals with Ghana, a country from the Gapminder dataset as has already been discussed from the beginning and progression through this course.     1)     Program  Code and Output

           #####################     OUTPUT BEGIN  #####################     Axes(0.125,0.125;0.775×0.775) Describe the centered…

  • | |

    Credit Approval Data Set – Predicting Credit Approval Using Logistic Regression and Matching Predictions to DataSet

    When someone applies for Credit, it will be unfair to reject those who duly qualify and it might be detrimental to the company to wrongly accept the wrong people.  This is likely to happen if we try to make such decisions based on gut feelings. So how do we use Machine Learning to increase our…

  • Opening and Reading Text Files by Buffer Size – Python

    Today, I went through “Opening and Reading Text Files by Buffer Size” with a friend of mine who wanted to grasp the basic concepts of Python This is a simple but straightforward tutorial into the “Opening and Reading Text Files by Buffer Size We further delved into opening and reading binary files. In our case…

  • | | | | |

    Java Python R SQL Excel Compared Similarities For Data Science and Data Analytics – The Basics

    If you have ever worked with Java, Python, R, SQL, Excel and other Languages on a varied Data Science or Data Analytics projects, you will realise that all these languages have similar syntaxes, or at least, can achieve the same objective with very similar codes.   Below is a comparison and similarities of these various tools…

Leave a Reply

Your email address will not be published. Required fields are marked *