It's not that I'm so smart, it's just that I stay with problems longer. - A. Einstein
Blog Code Challenges is back! And with a vengeance ;)
Starting today we will publish a new code challenge every week on Monday. On Friday (or latest the weekend) we will post a review.
Welcome to Pybites Code Challenge 51! In this challenge we get you analysing NBA player data from a CSV file.
If you are reading this on our blog head over to https://codechalleng.es/challenges/51.
If you need help getting ready with Github, see our new instruction video.
Now for the challenge:
Make a virtual env and install
requests. No need to install
sqlite3as it's part of the stdlib.
nba.pyfile over to your subdirectory.
As you can see in the template
nba.pyfile, we've given you a headstart by importing the data and parsing the CSV into a list of named tuples.
Start coding under the "#CODE HERE" comment and complete the 7 functions we've laid out for you.
Note that there are some assert statements under
mainto help you validate your code.
This challenge is mainly focused on sqlite3, but if you want to use an ORM like sqlalchemy or Pandas that's fine too.
A few more things before we take off:
Do you want to discuss this challenge and share your Pythonic journey with other passionate Pythonistas? Confirm your email on our platform then request access to our Slack via settings.
>>> from pybites import Bob, Julian Keep Calm and Code in Python!
See an error in this post? Please submit a pull request on Github.