This is a short course for data scientists that spend a lot of time working with pandas but may want to practice their pure Python skills.
The course is presented in the style of LeetCode. You have a series of problems to solve. Every problem has an instructions markdown file (index.md), a file with tests (test_all.py), a starter python file (template.py), and a python file with our solution (solution.py). For example:
- Instructions: index.md
- Tests: test_all.py
- Template: template.py
- Our Solution: solution.py
In each problem, you need to create problem.py and write your solution to the problem in that file. You can copy / paste the starter code from template.py.
- Install uv.
- Install VS Code.
- Clone this repository.
- Open py4ds.code-workspace.
- Install the recommended extensions. VS Code should prompt you.
- Open a terminal and install the project dependencies:
$ uv sync
In VS Code, right click README.md in the Explorer pane, and then click on Open Preview. This will open these instructions in preview mode so that you can follow the links in these markdown files.
Now, follow the link to Problem p9893!
- Problem p9893 - Sum of Two Values
- Problem p6136 - Read a File and Return a List of Numbers
- Problem p6897 - Read CSV as List of Dictionaries
- Problem p7519 - Filter Salaries Greater than 100k
- Problem p0738 - Read Salaries CSV as List of Salary Dataclasses
- Problem p5738 - Convert a List of Dictionaries to a Dictionary of Lists
- Problem p3036 - Convert a Dictionary of Lists to a List of Dictionaries
- Problem p5564 - Vectorize Words in a Sentence
- Problem p1322 - Summary Statistics of a Column in List of Dictionaries
- Problem p6808 - Model a Vector using Dataclasses