PyConDE & PyData Berlin 2024

Polars and Time Series: what it can do, and how to overcome any limitation
2024-04-23 , B05-B06

Time series analysis is ubiquitous in applied data science because of the value it delivers. In order to do effective time series analysis, you need to know your tools well. Polars has excellent built-in time series support, and it's also possible to extend it where necessary.

We will talk about:
- Basic built-in time series operations with Polars (e.g. "what's the average number of sales per month?").
- numba/numpy/scipy interoperability for not-so-basic time series operations (e.g. non-linear interpolation, or cumulative operations).
- Advanced, custom time series operations, and how you can implement them as Polars plugins (e.g. business day arithmetic).

Basic interest and knowledge of Python and data will be assumed, but no prior Polars experience is required.

Anyone working with time series and/or dataframes will likely benefit from the talk.


This will be a technical talk, teaching people how to use Polars effectively for time series analysis.

The format will be roughly:
- 5 mins: motivation, super-fast Polars crash course.
- 7 mins: what's built-in - making the most of Polars' built-in time series capabilities.
- 7 mins: when Polars isn't enough: interoperability with numba/scipy/numpy.
- 6 mins: when nothing is enough: writing your own Polars Plugin, and learning how to do that.
- 5 mins: engaging Q&A / awkward silence.

Attendees will leave knowing where to turn to for any time series analysis task they may encounter whilst using Polars.


Expected audience expertise: Domain:

Intermediate

Expected audience expertise: Python:

Intermediate

Abstract as a tweet (X) or toot (Mastodon):

Learn how to use Polars for time series: what it does, and it doesn't do (and what to do about that!)

Public link to supporting material, e.g. videos, Github, etc.:

https://github.com/pola-rs/polars ; https://github.com/MarcoGorelli/polars-business

See also: slides

Marco is a core dev of pandas and Polars and works at Quansight Labs as Senior Software Engineer. He also consults and trains clients professionally on Polars. He has also written the first Polars Plugins Tutorial and has taught Polars Plugins to clients.

He has a background in Mathematics and holds an MSc from the University of Oxford, and was one of the prize winners in the M6 Forecasting Competition (2nd place overall Q1).