From 897ab1299a1e58e6cf5a09359abf8840c39d8abd Mon Sep 17 00:00:00 2001 From: gandhivivek96 Date: Mon, 10 Sep 2018 06:39:01 +0000 Subject: [PATCH 1/3] Done --- q01_read_data/build.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/q01_read_data/build.py b/q01_read_data/build.py index e13d2f74..fa951df2 100644 --- a/q01_read_data/build.py +++ b/q01_read_data/build.py @@ -1,12 +1,11 @@ +# %load q01_read_data/build.py import yaml + def read_data(): + with open('./data/ipl_match.yaml') as f: + data = yaml.load(f) + return data - # import the csv file into `data` variable - # You can use this path to access the CSV file: '../data/ipl_match.yaml' - # Write your code here - data = - # return data variable - return data From 36addf65ab5b39f5ccb0362cc038c0d4a056d6ad Mon Sep 17 00:00:00 2001 From: gandhivivek96 Date: Mon, 10 Sep 2018 14:15:54 +0000 Subject: [PATCH 2/3] Done --- q02_teams/build.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/q02_teams/build.py b/q02_teams/build.py index 3cf9d3cf..14643f29 100644 --- a/q02_teams/build.py +++ b/q02_teams/build.py @@ -1,11 +1,13 @@ +# %load q02_teams/build.py # default imports from greyatomlib.python_getting_started.q01_read_data.build import read_data data = read_data() - +#print('hello coma estas world') # solution def teams(data=data): + teams = data['info']['teams'] + print(teams) + return teams + - # write your code here - #teams = - return teams From f60a9cfb056ca3ce64923ca3243dcde69a304c9a Mon Sep 17 00:00:00 2001 From: gandhivivek96 Date: Mon, 10 Sep 2018 14:39:15 +0000 Subject: [PATCH 3/3] Done --- q03_first_batsman/build.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/q03_first_batsman/build.py b/q03_first_batsman/build.py index 84984081..ab0d2b2c 100644 --- a/q03_first_batsman/build.py +++ b/q03_first_batsman/build.py @@ -1,13 +1,11 @@ +# %load q03_first_batsman/build.py # Default Imports from greyatomlib.python_getting_started.q01_read_data.build import read_data data = read_data() # Your Solution def first_batsman(data=data): - - # Write your code here - - + name = data['innings'][0]['1st innings']['deliveries'][0][0.1]['batsman'] + return name - return name