# Polars-Cookbook **Repository Path**: lxq9031/Polars-Cookbook ## Basic Information - **Project Name**: Polars-Cookbook - **Description**: No description available - **Primary Language**: Rust - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-11 - **Last Updated**: 2025-08-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Machine Learning Summit 2025

## Machine Learning Summit 2025 **Bridging Theory and Practice: ML Solutions for Today’s Challenges** 3 days, 20+ experts, and 25+ tech sessions and talks covering critical aspects of: - **Agentic and Generative AI** - **Applied Machine Learning in the Real World** - **ML Engineering and Optimization** 👉 [Book your ticket now >>](https://packt.link/mlsumgh) --- ## Join Our Newsletters 📬 ### DataPro *The future of AI is unfolding. Don’t fall behind.*

DataPro QR

Stay ahead with [**DataPro**](https://landing.packtpub.com/subscribe-datapronewsletter/?link_from_packtlink=yes), the free weekly newsletter for data scientists, AI/ML researchers, and data engineers. From trending tools like **PyTorch**, **scikit-learn**, **XGBoost**, and **BentoML** to hands-on insights on **database optimization** and real-world **ML workflows**, you’ll get what matters, fast. > Stay sharp with [DataPro](https://landing.packtpub.com/subscribe-datapronewsletter/?link_from_packtlink=yes). Join **115K+ data professionals** who never miss a beat. --- ### BIPro *Business runs on data. Make sure yours tells the right story.*

BIPro QR

[**BIPro**](https://landing.packtpub.com/subscribe-bipro-newsletter/?link_from_packtlink=yes) is your free weekly newsletter for BI professionals, analysts, and data leaders. Get practical tips on **dashboarding**, **data visualization**, and **analytics strategy** with tools like **Power BI**, **Tableau**, **Looker**, **SQL**, and **dbt**. > Get smarter with [BIPro](https://landing.packtpub.com/subscribe-bipro-newsletter/?link_from_packtlink=yes). Trusted by **35K+ BI professionals**, see what you’re missing. # Polars-Cookbook B21621 - Polars Cookbook - [Available as an ebook and a physical copy on Amazon](https://www.amazon.com/Polars-Cookbook-practical-transform-manipulate/dp/1805121154) ## [Chapter 1: Getting Started with Python Polars](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter01/ch01.ipynb) - Introducing Key Features in Polars - The Polars DataFrame - The Polars Series - The Polars LazyFrame - Selecting columns and filtering data - Creating, modifying, and deleting columns - Understanding method chaining - Processing datasets larger than RAM ## [Chapter 2: Reading and Writing Files](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter02/ch02.ipynb) - Reading and writing CSV files - Reading and writing parquet files - Reading and writing delta tables - Reading and writing JSON files - Reading and writing excel files - Reading and writing other data file formats - Reading and writing multiple files - Working with databases ## [Chapter 3: An Introduction to Data Analysis in Python Polars](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter03/ch03.ipynb) - Inspecting the DataFrame - Casting data types - Handling duplicate values - Masking sensitive data - Visualizing data using Plotly - Detecting and handling outliers ## [Chapter 4: Data Transformation Techniques](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter04/ch04.ipynb) - Exploring basic aggregations - Using group by aggregations - Aggregating values across multiple columns - Computing with window functions - Applying UDFs - Using SQL for data transformations ## [Chapter 5: Handling Missing Data](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter05/ch05.ipynb) - Identifying missing data - Deleting rows and columns containing missing data - Filling missing data ## [Chapter 6: Performing String Manipulations](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter06/ch06.ipynb) - Filtering strings - Converting strings into a Date/Datetime/Time - Extracting substrings - Cleaning strings - Splitting strings into lists and structs - Concatenating and combining strings ## [Chapter 7: Working with Nested Data Structures](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter07/ch07.ipynb) - Creating lists - Aggregating elements in lists - Accessing and selecting elements in lists - Applying logic to each element in lists - Working with structs and JSON data ## [Chapter 8: Reshaping and Tidying Data](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter08/ch08.ipynb) - Turning columns into rows - Turning rows into columns - Joining DataFrames - Concatenating DataFrames - Other reshaping techniques ## [Chapter 9: Time Series Analysis](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter09/ch09.ipynb) - Working with date and time - Applying rolling windows calculations - Resampling techniques - Time series forecasting with the functime library ## [Chapter 10: Interoperability With Other Python Libraries](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter10/ch10.ipynb) - Converting to and from a pandas DataFrame - Converting to and from NumPy arrays - Interoperating with PyArrow - Integration with DuckDB ## [Chapter 11: Working With Common Cloud Sources](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter11/ch11.ipynb) - Amazon S3 - Azure Blog Storage - Google Cloud Storage - BigQuery - Snowflake ## [Chapter 12: Testing and Debugging in Polars](https://github.com/PacktPublishing/Polars-Cookbook/blob/main/Chapter12/ch12.ipynb) - Debugging chained operations - Inspecting and optimizing the query plan - Testing data quality with cuallee - Running unit tests with Pytest ## Errata * Page 06 (code block 1): **Import polars as pl** _should be_ **import polars as pl** * Page 23 (code block 2, line 2): **df.select(cs.numeric()).head()** _should be_ **df.select(cs.string()).head()** ## New Outstanding Features and Breaking Changes NOT Captured in the Book - Version 1.6.0 - Use Altair in DataFrame.plot ([#17995](https://github.com/pola-rs/polars/pull/17995)).