Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
About Article
Analyze Data
Archive
Best Practices
Better Outputs
Blog
Code Optimization
Code Quality
Command Line
Course
Daily tips
Dashboard
Data Analysis & Manipulation
Data Engineer
Data Visualization
DataFrame
Delta Lake
DevOps
DuckDB
Environment Management
Feature Engineer
Git
Jupyter Notebook
LLM
LLM Tools
Machine Learning
Machine Learning & AI
Machine Learning Tools
Manage Data
MLOps
Natural Language Processing
Newsletter Archive
NumPy
Pandas
Polars
PySpark
Python Helpers
Python Tips
Python Utilities
Scrape Data
SQL
Testing
Time Series
Tools
Visualization
Visualization & Reporting
Workflow & Automation
Workflow Automation

Newsletter #247: whenever: Simple Python Timezone Conversion

Newsletter #247: whenever: Simple Python Timezone Conversion


๐Ÿค COLLABORATION

Build Safer APIs with Buf – Free Workshop

Building APIs is simple. Scaling them across teams and systems isn’t. Ensuring consistency, compatibility, and reliability quickly becomes a challenge as projects grow.

Buf provides a toolkit that makes working with Protocol Buffers faster, safer, and more consistent.

Join Buf for a live, one-hour workshop on building safer, more consistent APIs.

When: Nov 19, 2025 โ€ข 9 AM PDT | 12 PM EDT | 5 PM BST

What you’ll learn:

  • How Protobuf makes API development safer and simpler
  • API design best practices for real-world systems
  • How to extend Protobuf to data pipelines and streaming systems

โ†’ Register for the workshop


๐Ÿ“… Today’s Picks

whenever: Simple Python Timezone Conversion

Code example: whenever: Simple Python Timezone Conversion

Problem

Adding 8 hours to 10pm shouldn’t give you the wrong morning time, but with Python’s datetime, it can.

The standard library fails during DST transitions, returning incorrect offsets when clocks change for daylight saving.

Solution

Whenever provides simple, explicit timezone conversion methods with clear semantics.

Key benefits:

  • DST-safe arithmetic with automatic offset adjustment
  • Type safety prevents naive/aware datetime bugs
  • Clean timezone conversions with .to_tz()
  • Nanosecond precision for deltas and timestamps
  • Pydantic integration for serialization

Build Readable Scatter Plots with adjustText Auto-Positioning

Code example: Build Readable Scatter Plots with adjustText Auto-Positioning

Problem

Text labels in matplotlib scatter plots frequently overlap with each other and data points, creating unreadable visualizations.

Manually repositioning each label to avoid overlaps is tedious and time-consuming.

Solution

adjustText automatically repositions labels to eliminate overlaps while connecting them to data points with arrows.

All you need is to collect your text objects and call adjust_text() with optional arrow styling.


๐Ÿ“ข ANNOUNCEMENTS

Featured on LeanPub: Production-Ready Data Science

Featured on LeanPub: Production-Ready Data Science

My book Production-Ready Data Science was featured on the LeanPub home page!

LeanPub is a leading platform for publishing and selling self-published technical books, so it’s truly an honor to see my work highlighted there.

The book shares everything I’ve learned about turning data science prototypes into reliable, production-ready systems, from managing dependencies to automating workflows.

Thank you to everyone who has purchased or shared it. Your support means everything.

The book is currently on sale for 58% off until November 16.

โ†’ Get Your Copy Now (58% Off)


โ˜•๏ธ Weekly Finds

featuretools [ML] – An open source python library for automated feature engineering

datachain [Data Processing] – ETL, Analytics, Versioning for Unstructured Data – AI-data warehouse to enrich, transform and analyze data from cloud storages

logfire [Python Utils] – Uncomplicated Observability for Python and beyond – an observability platform built on OpenTelemetry from the team behind Pydantic

Looking for a specific tool? Explore 70+ Python tools โ†’

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

Leave a Comment

Your email address will not be published. Required fields are marked *

0
    0
    Your Cart
    Your cart is empty
    Scroll to Top

    Work with Khuyen Tran

    Work with Khuyen Tran