🎉 Pandas 3 is out! As of last week, saying “pip install pandas” or “uv add pandas” gives you the latest version. What’s new? What has changed? I’ve got a whole YouTube playlist, explaining what you need to know: https://www.youtube.com/playlist?list=PLbFHh-ZjYFwFWHVT0qeg9Jz1TBD0TlJJT
Heard about __new__, the constructor in Python? You can basically forget about it. It’s for advanced, unusual cases. Just use __init__! It runs automatically on every new instance. __init__ is for assigning attributes to self (what other languages call “instance variables”).
Know Python Pandas series methods? You already know data frame methods! Same methods, applied column-wise!
Reading a multi-sheet Excel file into Python Pandas? Ask for a specific sheet by name or index: Get a dict of data frames with specific sheets:
Using uv? The Python version is stored in .python-version. Change it with But: uv gives an error: 3.13 is incompatible with requires-python in pyproject.toml of ‘>=3.14.’
The AI revolution is here. Engineers at major companies are now using AI instead of writing code directly. But there’s a gap: Most developers know how to write code OR how to prompt AI, but not both. When working with real data, vague AI prompts produce code that might work on sample datasets but creates…
Want to get the unique values from a Python list? Use a set! Of course, list elements must be hashable!
Many years ago, a friend of mine described how software engineers solve problems: In other words: You can be the person writing the code, and solving the problem directly. Or you can manage people, specifying what they should do. Or you can invest in teams, telling them about the problems you want to solve, but…
How much memory does a text column in your Python Pandas data frame use? Check: But this is likely a huge underestimate! It sums the pointer sizes, not the string sizes. Instead, say: Or:
Want to analyze data? Good news: Python is the leading language in the data world. Libraries like NumPy and Pandas make it easy to load, clean, analyze, and visualize your data. But wait: If your colleagues aren’t coders, how can they explore your data? The answer: A data dashboard, which uses UI elements (e.g., sliders,…