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 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