Polars Essentials
Duration
2 days
Description
This course provides a comprehensive introduction to Polars, a blazingly fast DataFrame library implemented in Rust and available in Python. The course covers everything from installation and migration from Pandas to mastering the Rust & Python API, data types, data structures, and more. It delves into the use of expressions, transformations, Lazy API, and IO interaction. The course also includes a section on plotting with hvPlot and MatPlotLib. By the end of the course, students will have a solid understanding of Polars and be able to use it effectively in their programming projects.
Objectives
- Understand the basics of Polars and how to install and get started with it.
- Learn the concepts of Rust & Python API, data types, data structures, contexts, expressions, and APIs.
- Master the use of basic operators, column selections, functions, casting, strings, aggregation, missing data, window functions, folds, lists and arrays, user-defined functions, and struct data type.
- Learn how to transform data using joins, concatenations, pivots & unpivots, and time series.
- Understand the usage, optimization, schema, query plan & execution, and streaming of Lazy API.
- Learn how to interact with various IO such as CSV, Excel, JSON, and SQL Databases.
- Gain skills in plotting with hvPlot and MatPlotLib.
- Consolidate and apply all learned skills and knowledge in Polars.
Prerequisites
- Software development experience, this is not a general introduction to programming course.
- Basic understanding of programming concepts such as variables, expressions, functions, and control flow.
Training Materials
All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples. Students practice the topics covered through challenging hands-on lab exercises.
Software Requirements
Students will need a free, personal GitHub account to access the courseware. Student will need permission to install Rust and Visual Studio Code on their computers. Also, students will need permission to install Rust Crates and Visual Studio Extensions. If students are unable to configure a local environment, a cloud-based environment can be provided.
Outline
- Introduction
- What is Polars?
- Getting Started
- Installation
- Install Rust Crate
- Install Python Package
- Feature Flags
- Migrating from Pandas
- Programming with Rust and/or Python
- Concepts
- Rust & Python API
- Data Types
- Data Structures
- Contexts
- Expressions
- Lazy / Eager API
- Streaming API
- Expressions
- Basic Operators
- Column Selections
- Functions
- Casting
- Strings
- Aggregation
- Missing Data
- Window Functions
- Folds
- Lists and Arrays
- User Defined Functions
- Struct Data Type
- Transformations
- Joins
- Concatenations
- Pivots & Unpivots
- Time series
- Lazy API
- Usage
- Optimizations
- Schema
- Query plan & execution
- Streaming
- IO
- CSV
- Excel
- JSON
- SQL Databases
- Plotting
- hvPlot
- MatPlotLib
- Conclusion