From 4af178ee9a1111f816d66f8d1f67287e20b7d703 Mon Sep 17 00:00:00 2001 From: Devil27 Date: Sat, 29 Sep 2018 05:49:16 +0000 Subject: [PATCH 1/3] Done --- q01_read_data/build.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/q01_read_data/build.py b/q01_read_data/build.py index e13d2f74..86ce47c1 100644 --- a/q01_read_data/build.py +++ b/q01_read_data/build.py @@ -1,12 +1,14 @@ +# %load q01_read_data/build.py import yaml def read_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 = + file = './data/ipl_match.yaml' + with open(file) as f: + data = yaml.load(f) # return data variable return data + + + + From bddf09ec0e3a490b5d1201efd0dbe02bd8578269 Mon Sep 17 00:00:00 2001 From: Devil27 Date: Wed, 30 Jan 2019 17:40:03 +0000 Subject: [PATCH 2/3] Done --- q02_teams/build.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/q02_teams/build.py b/q02_teams/build.py index 3cf9d3cf..3b166216 100644 --- a/q02_teams/build.py +++ b/q02_teams/build.py @@ -1,11 +1,12 @@ -# default imports +#%load q02_teams/build.py +#default import from greyatomlib.python_getting_started.q01_read_data.build import read_data data = read_data() # solution def teams(data=data): + teams = data['info']['teams'] + return teams +print(teams) - # write your code here - #teams = - return teams From c7c8293df65504fe469f9114e4dea02d44837b14 Mon Sep 17 00:00:00 2001 From: Devil27 Date: Wed, 30 Jan 2019 17:40:45 +0000 Subject: [PATCH 3/3] Done --- q02_teams/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/q02_teams/build.py b/q02_teams/build.py index 3b166216..cc6382db 100644 --- a/q02_teams/build.py +++ b/q02_teams/build.py @@ -7,6 +7,6 @@ def teams(data=data): teams = data['info']['teams'] return teams -print(teams) +print('teams')