Switch branches/tags
Nothing to show
Find file History
Latest commit feb9007 May 31, 2014 @mjhea0 mjhea0 upated readme
Failed to load latest commit information.
parse_csv.py updates May 17, 2014
parse_csv_test.py updates May 17, 2014
readme.md upated readme May 31, 2014
test.csv initial May 10, 2014
weather.csv initial May 10, 2014


Interview Question: Parsing CSV Files


  1. Football: The football.csv file contains the results from the English Premier League. The columns labeled ‘Goals’ and ‘Goals Allowed’ contain the total number of goals scored for and against each team in that season (so Arsenal scored 79 goals against opponents, and had 36 goals scored against them). Write a program to read the file, then print the name of the team with the smallest difference in ‘for’ and ‘against’ goals.
  2. Weather: In weather.csv you’ll find daily weather data. Write a program to read the file, then output the day number (column one) with the smallest temperature spread (the maximum temperature is the second column, the minimum the third column).
  3. See if you can write the same program to solve both questions.
  4. Test Driven Development!

Blog post

Check out the full answer here. Cheers!