Skip to content

Polars: Chapter 09 - Strings#52

Merged
akshayka merged 4 commits intomarimo-team:mainfrom
peter-gy:peter-gy/polars_09_strings
Mar 7, 2025
Merged

Polars: Chapter 09 - Strings#52
akshayka merged 4 commits intomarimo-team:mainfrom
peter-gy:peter-gy/polars_09_strings

Conversation

@peter-gy
Copy link
Contributor

@peter-gy peter-gy commented Mar 7, 2025

📝 Summary

This is my proposal for the first version of the Polars chapter on strings. My goal was to offer decent horizontal coverage of the expressions in the string namespace while ensuring the material is kept interactive and engaging through visualizations and a mini app.

You can try this notebook by executing:

uvx marimo run https://github.com/peter-gy/learn/blob/0a4006f71ed4a19f19c410bab8da7ff9ae75d31a/polars/09_strings.py --sandbox

The chapter is made up of the following sections:

  • 🛠️ Parsing & Conversion
  • 📊 Dataset Overview
  • 📏 Length Calculation
  • 🔠 Case Conversion
  • ➕ Padding
  • 🔄 Replacing
  • 🔍 Searching & Matching
  • ✂️ Slicing and Substrings
  • ➗ Splitting
  • 🔗 Concatenation & Joining
  • 🔍 Pattern-based Extraction
  • 🧹 Stripping
  • 🔑 Encoding & Decoding
  • 🚀 Application: Dynamic Execution of Polars Examples

📋 Checklist

  • I have included package dependencies in the notebook file using --sandbox
  • Keep language direct and simple. (This is subjective, I'm open to feedback to simplify language if needed)

Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peter-gy, this is absolutely beautiful. What a fantastic chapter — love the dataset, love the clarity of exposition, love the simplicity of the interactive examples.

The only very small comment I have is that we typically configure the notebook to hide the code of markdown cells, but I can do that in a follow up. Fantastic work.

@akshayka akshayka merged commit 7b36ccd into marimo-team:main Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants