Pages

Topics

Tools

↑↓navigate↵openescclose

Python guides

Every published Python guide, newest first, with practical examples you can copy into your own project.

3,965 guides across 14 topics

Topics

Latest Python guides

Illustration of a lazy data pipeline in Polars: CSV and Parquet files feeding into a LazyFrame, then a collect step producing a DataFrame.
Python

Python Polars LazyFrame: scan_csv, scan_parquet, and collect

Learn how to use Polars LazyFrame with scan_csv and scan_parquet, build lazy query pipelines, and call collect to execute queries.

PolarsLazyFrameData Engineering
Illustration of a dataframe with columns for strings and datetime values being transformed into clean, typed data.
Python

Polars String and Datetime Operations for Clean Data Pipelines

Learn practical Polars string and datetime operations: parsing, formatting, regex, date arithmetic, time zones, and performance tips for clean data pipelines.

polarsstring manipulationdatetime parsingdata transformation
Illustration of a Polars DataFrame with null cells being filled and removed, showing before and after states.
Python

Python Polars: Handling Null Values with fill_null and drop_nulls

python polars null values fill_null and drop_nulls: Learn how to handle missing data in Polars using fill_null and drop_nulls, with practical examples and performance...

Polarsdata cleaningmissing dataDataFrame
Illustration of three data streams merging into a single output, representing Polars join, concat, and unique operations.
Python

Python Polars Join, Concat, and Unique Operations

Practical guide to using Polars join, concat, and unique to combine and deduplicate DataFrames, with examples for common production edge cases.

polarsdataframedata-engineeringpython
Illustration of a Polars DataFrame being grouped, aggregated, and sorted, showing the transformation pipeline.
Python

Python Polars group_by Aggregation and Sorting

Learn practical Python Polars group_by aggregation and sorting patterns, including multiple aggregations, aliasing, sorting within groups, null handling, and lazy evaluation.

PolarsDataFramesgroup_byAggregation
Illustration of a Polars DataFrame with conditional branches flowing into a result column, representing when-then-otherwise logic.
Python

Polars when-then-otherwise: Conditional Expressions in Python

Learn how to use Polars when-then-otherwise expressions to create conditional columns, chain multiple conditions, and handle type and null edge cases.

PolarsConditional LogicDataFramesPython
Illustration of Polars DataFrame operations with select, filter, and with_columns expressions.
Python

Python Polars: select, filter, and with_columns Expressions

Learn how to use Polars' select, filter, and with_columns expressions to choose columns, filter rows, and add derived columns in DataFrame pipelines.

PolarsDataFrameData TransformationExpressions
Illustration of a Polars DataFrame being read from a CSV file and written to a Parquet file, showing data flow between formats.
Python

Read and Write CSV and Parquet Files with Polars DataFrames in Python

Read and write Polars DataFrames to CSV and Parquet files. Includes schema handling, compression, null values, and lazy scans for large files.

PolarsDataFrameCSVParquet
Side-by-side comparison of pandas and Polars DataFrame libraries with a split visual showing traditional vs modern data processing approaches.
Python

python pandas vs polars: Which Dataframe Library to Choose

python pandas vs polars: Compare pandas and Polars for Python data manipulation: API differences, execution models, memory behavior, and practical guidance on choosing...

pandaspolarsdataframedata manipulation
Illustration of a pandas DataFrame converting to a NumPy array, with labeled rows and columns transforming into a compact grid.
Python

Python Pandas NumPy Conversion: DataFrame to Array

Practical examples and guidance for converting pandas DataFrames and Series to NumPy arrays, including dtype handling, views versus copies, and common pitfalls.

pandasnumpydata conversionDataFrame