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
sqlite3 as it's part of the stdlib.
nba.py file over to your subdirectory.
As you can see in the template
nba.py file, 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
main to 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!
Do you want to get 250+ concise and applicable Python tips in an ebook that will cost you less than 10 bucks (future updates included), check it out here.
"The discussions are succinct yet thorough enough to give you a solid grasp of the particular problem. I just wish I would have had this book when I started learning Python." - Daniel H
"Bob and Julian are the masters at aggregating these small snippets of code that can really make certain aspects of coding easier." - Jesse B
"This is now my favourite first Python go-to reference." - Anthony L
"Do you ever go on one of those cooking websites for a recipe and have to scroll for what feels like an eternity to get to the ingredients and the 4 steps the recipe actually takes? This is the opposite of that." - Sergio S