This repository contains public notebooks and datasets to accompany my Data Analysis with Polars course on Udemy.
If you want to join me on the course please use this referral link for a 50% discount: https://www.udemy.com/course/data-analysis-with-polars/?couponCode=POLARS_HALF_PRICE
For a general introduction to Polars see this workshop I lead on youtube and the workshop materials in the notebooks/ml directory of this repository.
- intro/00-KeyConcepts.ipynb - an introduction to the big ideas behind Polars
- intro/02-LazyPolarsIntro.ipynb - an introduction to lazy mode in Polars
- filtering_rows/02-SelectingRowsFilter.ipynb - a key lecture where we learn how to use the Expression API to filter rows in Polars
- time_series/01-IntroTimeSeries.ipynb - the time series dtypes in Polars
- time_series/02-TimeZones.ipynb - converting between time zones in Polars
- ml/CatboostElectricityForecasting.ipynb - introductory notebook with a simple example of using Polars with Catboost to forecast electricity demand
Want to know more about Polars for high performance data science and ML? Then you can:
I recommend cloning the repository and runnng the notebooks locally on your computer. However, you can run the notebooks interactively using binder by clicking the following link:
I run the code using docker. If you have docker installed then you:
- run the
deploy.sh
with bash as./deploy.sh
- when the container starts in interactive mode run
jlab
to start the notebooks (jlab
is an alias for jupyterlab I define in the Dockerfile) - when jupyter is ready it gives you a web address that you can enter in your browser like http://127.0.0.1:8888/lab?token=e81f5485724f9107e2252fcf71d0eb2c76a027c1be1d10b7
- Run the
pip-deploy.sh
script - Activate the virtual environment with
source course_env/bin/activate
- Confirm the virtual environment is activated with
which python
. The output should end withcourse_env/bin/python
- Start the Jupyter notebooks with
jupyter lab
. This will either open the notebook in your browser or print a URL that you can use to open the notebook in your browser - Check your installation by opening notebooks/TestInstallation.ipynb
- Open powershell in this directory
- Run the powershell script
create-course-environment.ps1
- Run the powershell script
activate-course-environment.ps1
- Confirm that the virtual environment is working: it should say course_env at the start of your powershell prompt
- Run:
jupyter lab
- Check your installation by opening notebooks/TestInstallation.ipynb