D

Data & Analytics

Pandas, SQL, Power BI, Tableau, data visualization

41 articles

Advertisement

Pandas melt and stack Producing Duplicate Rows: Reshaping Pitfalls Fixed

Reshaping data with Pandas melt() and stack() is a common task in analytics pipelines, but many developers are surprised when the resulting dataset contains duplicate rows, inflated record counts, or incorrect aggregations. Learn why these issues occur and how to avoid them.

Jun 28, 2026 4m read πŸ‘ 31

SQL GROUP BY Silently Excluding NULLs: How to Catch and Fix It

GROUP BY quietly treats NULL as its own group, but aggregations like COUNT and SUM still skip NULL values inside columns β€” leaving your totals wrong with no error message. Here's how to catch it before it costs you.

Jun 26, 2026 4m read πŸ‘ 84

Tableau LOD Expressions Returning Unexpected Values: Causes and Fixes

LOD expressions are supposed to give you precise control over aggregation granularity in Tableau β€” but when they return wrong numbers, diagnosing the cause is maddening. Here's a practical breakdown of every common failure mode and how to fix each one.

Jun 19, 2026 10m read πŸ‘ 61

Why Your Pandas groupby Aggregation Is Returning Wrong Numbers

Your groupby().sum() looks right but the numbers are off. Before you blame the data, check these common Pandas aggregation traps β€” duplicate rows, NaN handling, dtype coercion, and more β€” that silently corrupt your results.

Jun 19, 2026 9m read πŸ‘ 96
πŸ“¬ Weekly Newsletter

Stay ahead of the curve

Get the best programming tutorials, data analytics tips, and tool reviews delivered to your inbox every week.

No spam. Unsubscribe anytime.