Posts

Showing posts from October, 2016

Pandas Land

Introduction This is Panda exercises: Data Frames In this section, I explore how to create data frames from different ways: list dictionary Json csv file In addition to that basic Data Frame (DF) manipulations: import pandas as pd cols = { 'name' : [ 'Ted' , 'Mak' , 'Nina' , 'Leo' ] , 'age' : [ 50 , 20 , 33 , 25 ] } l_students= [{ 'name' : 'Tailor' , 'grade' : '10' , 'math' : 60 } ,{ 'name' : 'Lora' , 'grade' : '09' , 'math' : 80 } ,{ 'name' : 'Joe' , 'grade' : '11' , 'math' : 56.90 } ,{ 'name' : 'Tailor' , 'grade' : '11' , 'math' : 68.98 } ] studemtDF = pd.DataFrame(l_students) # read from the json import json json_students = json.dumps(l_students) # [ # { # "grade": "10", #