Blog

Dive into Python, clean code practices, and real-world development tips.

How range() Works — Lazy, Not a List

By Jeferson Peter • Oct 20, 2025 Python

The built-in `range()` function doesn’t create a list of numbers. It creates a lazy sequence that generates numbers on demand.

Handling Null Values — Pandas vs Polars

By Jeferson Peter • Oct 16, 2025 Polars & Pandas

Null values are common in datasets. Let’s see how Pandas and Polars deal with missing data using `fill` and `drop` methods.

The Unpacking Operator * in Lists and Dictionaries

By Jeferson Peter • Oct 13, 2025 Python

The unpacking operators `*` and `**` let you expand lists and dictionaries in flexible ways. Let’s see practical examples.

Merge/Join Operations — Pandas vs Polars

By Jeferson Peter • Oct 9, 2025 Polars & Pandas

Merging and joining tables is fundamental in data analysis. Let’s compare how Pandas and Polars perform joins side by side.

Understanding __str__ vs __repr__

By Jeferson Peter • Oct 6, 2025 Python

Both `__str__` and `__repr__` define string representations of objects, but they serve different purposes. Let’s compare with examples.

GroupBy Operations — Pandas vs Polars

By Jeferson Peter • Oct 2, 2025 Polars & Pandas

Grouping and aggregating data is a core task in data analysis. Let’s compare how Pandas and Polars handle GroupBy operations.

Working with Dates — Pandas vs Polars

By Jeferson Peter • Sep 30, 2025 Polars & Pandas

Dates and times are everywhere in datasets. Let’s see how Pandas and Polars parse and handle them.

The itertools Module in 3 Quick Examples

By Jeferson Peter • Sep 29, 2025 Python

The `itertools` module offers powerful tools for iteration. Let’s see three quick examples: `count`, `cycle`, and `combinations`.

CSV Read Performance — Pandas vs Polars

By Jeferson Peter • Sep 25, 2025 Polars & Pandas

How fast can Pandas and Polars read large CSV files? Let’s compare their performance with a simple example.

Advanced f-strings — Formatting Dates and Numbers

By Jeferson Peter • Sep 22, 2025 Python

f-strings are powerful for more than just inserting variables. Learn how to format numbers, dates, and more with concise syntax.