From 8381f26dc4eac035c89f0b5697c6669f56955098 Mon Sep 17 00:00:00 2001 From: AnupamIIM Date: Sat, 8 Sep 2018 04:23:59 +0000 Subject: [PATCH 1/2] Done --- q01_read_data/build.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/q01_read_data/build.py b/q01_read_data/build.py index e13d2f74..14ba775f 100644 --- a/q01_read_data/build.py +++ b/q01_read_data/build.py @@ -1,12 +1,23 @@ import yaml - def read_data(): + with open('data/ipl_match.yaml','r') 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 da42d1a1d81cec04088c865f9fd5e3510e21045f Mon Sep 17 00:00:00 2001 From: AnupamIIM Date: Sat, 8 Sep 2018 06:21:22 +0000 Subject: [PATCH 2/2] Done --- q02_teams/build.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/q02_teams/build.py b/q02_teams/build.py index 3cf9d3cf..e949895c 100644 --- a/q02_teams/build.py +++ b/q02_teams/build.py @@ -1,11 +1,5 @@ -# default imports -from greyatomlib.python_getting_started.q01_read_data.build import read_data -data = read_data() +def teams(matchDetails): + return matchDetails ['info']['teams'] + -# solution -def teams(data=data): - # write your code here - #teams = - - return teams