<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vimal Nakrani</title>
    <description>The latest articles on DEV Community by Vimal Nakrani (@vimal_nakrani).</description>
    <link>https://dev.to/vimal_nakrani</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3983002%2F6923f662-042c-41fe-aac4-7fda94f8eb46.png</url>
      <title>DEV Community: Vimal Nakrani</title>
      <link>https://dev.to/vimal_nakrani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vimal_nakrani"/>
    <language>en</language>
    <item>
      <title>Why did my DataFrame lose rows? Debugging silent pandas pipeline failures</title>
      <dc:creator>Vimal Nakrani</dc:creator>
      <pubDate>Sat, 13 Jun 2026 17:49:27 +0000</pubDate>
      <link>https://dev.to/vimal_nakrani/why-did-my-dataframe-lose-rows-debugging-silent-pandas-pipeline-failures-4i0</link>
      <guid>https://dev.to/vimal_nakrani/why-did-my-dataframe-lose-rows-debugging-silent-pandas-pipeline-failures-4i0</guid>
      <description>&lt;p&gt;If you've written more than a handful of pandas pipelines, you know this feeling: the row count at the end is wrong, the numbers are slightly off, and somewhere across fifteen transformation steps, &lt;em&gt;something&lt;/em&gt; changed your data without telling you. No exception. No warning. Just a quietly wrong answer.&lt;/p&gt;

&lt;p&gt;These are the worst bugs in data work, because they don't crash — they ship. A dashboard shows a number that's 3% low. A model trains on rows that shouldn't exist. A report goes to a client missing a region. And by the time anyone notices, the pipeline has run a hundred times.&lt;/p&gt;

&lt;p&gt;This post is about why these failures happen, the usual (painful) way people debug them, and a small open-source tool I built called &lt;a href="https://pypi.org/project/dframe-trace/" rel="noopener noreferrer"&gt;&lt;code&gt;dframe-trace&lt;/code&gt;&lt;/a&gt; that automates the tedious part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three silent killers
&lt;/h2&gt;

&lt;p&gt;Almost every silent pipeline bug falls into one of three buckets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rows disappear.&lt;/strong&gt; A &lt;code&gt;merge&lt;/code&gt; with &lt;code&gt;how="inner"&lt;/code&gt; quietly drops every row without a match. A filter is slightly too aggressive. A &lt;code&gt;dropna&lt;/code&gt; removes more than you intended. The pipeline still runs; it just runs on less data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nulls appear.&lt;/strong&gt; A left join against an incomplete lookup table introduces blank values in the new columns. A &lt;code&gt;reindex&lt;/code&gt; or &lt;code&gt;pivot&lt;/code&gt; creates gaps. Downstream, those nulls become zeros, or get dropped, or silently skew an average.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dtypes drift.&lt;/strong&gt; A column of integers becomes floats after a merge with missing values. A date column comes back as a string. An &lt;code&gt;astype&lt;/code&gt; does something subtly different from what you expected. Nothing breaks immediately — but a join key that flipped from &lt;code&gt;int64&lt;/code&gt; to &lt;code&gt;float64&lt;/code&gt; will silently fail to match later.&lt;/p&gt;

&lt;p&gt;The common thread: none of these raise an error. Your code is "correct" in the sense that it executes. It's just wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The usual way to debug this
&lt;/h2&gt;

&lt;p&gt;When the final number looks off, most of us reach for the same tool — print statements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_data&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                                   &lt;span class="c1"&gt;# (10000, 8)
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;left&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;isna&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;        &lt;span class="c1"&gt;# (10000, 9), 240 nulls?!
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                                   &lt;span class="c1"&gt;# (8800, 9)
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dropna&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                                   &lt;span class="c1"&gt;# (8560, 9)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works. It's also miserable. You're editing working code to add instrumentation, re-running the whole pipeline, eyeballing a wall of numbers, then deleting it all once you've found the culprit — until next time, when you add it all back. You're manually reconstructing information the pipeline already had and threw away.&lt;/p&gt;

&lt;p&gt;What you actually want is to run your code once, normally, and then &lt;em&gt;ask questions about what happened&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A different approach: trace first, ask later
&lt;/h2&gt;

&lt;p&gt;That's the idea behind &lt;code&gt;dframe-trace&lt;/code&gt;. Instead of declaring rules up front or instrumenting by hand, you turn on recording, run your normal code, and interrogate the trace afterward.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;dframe-trace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has no required dependencies — you bring your own pandas and/or polars.&lt;/p&gt;

&lt;p&gt;The lowest-friction way to use it patches the DataFrame methods that most often cause silent bugs, so you don't have to touch your functions at all:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dframe_trace&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;autopatch&lt;/span&gt;

&lt;span class="n"&gt;autopatch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;install&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;   &lt;span class="c1"&gt;# one line at the top of your script
&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;left&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# recorded automatically
&lt;/span&gt;    &lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;float64&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;           &lt;span class="c1"&gt;# recorded automatically
&lt;/span&gt;    &lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dropna&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;           &lt;span class="c1"&gt;# recorded automatically
&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;where_null_introduced&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;   &lt;span class="c1"&gt;# -&amp;gt; "merge"
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;report&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;report()&lt;/code&gt; gives you a step-by-step diff of what each operation did:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dframe-trace report
============================================================
[0] load  (0.5 ms)
    start: 4 rows, 2 cols
[1] merge_meta  (1.4 ms)
    +cols: ['region']
    nulls region: 0 -&amp;gt; 1  [WARN]
[2] filter  (0.4 ms)
    rows: -1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of bisecting by hand, you get a direct answer: the &lt;code&gt;merge&lt;/code&gt; introduced the nulls in &lt;code&gt;region&lt;/code&gt;, and a later step dropped a row. The questions you can ask map onto the three silent killers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;where_null_introduced&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# which step first added nulls to this column
&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;where_rows_lost&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;                 &lt;span class="c1"&gt;# [(step_name, negative_delta), ...]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you'd rather not patch anything globally, there's a decorator form — wrap the functions you care about with &lt;code&gt;@traced("name")&lt;/code&gt; and run them inside the &lt;code&gt;trace()&lt;/code&gt; block. Same recording, more explicit control.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this differs from Great Expectations and Pandera
&lt;/h2&gt;

&lt;p&gt;The Python data-validation space is crowded and mature, so it's worth being precise about where this fits.&lt;/p&gt;

&lt;p&gt;Tools like &lt;strong&gt;Great Expectations, Pandera, and Hamilton&lt;/strong&gt; check your data against rules &lt;em&gt;you write in advance&lt;/em&gt;: "this column must never be null," "row count must stay above 1,000." They're excellent and they're the right choice when you already know what correct looks like and want to enforce it in production.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dframe-trace&lt;/code&gt; is the opposite philosophy: &lt;strong&gt;zero rules.&lt;/strong&gt; You declare nothing. It records what every step did and lets you ask, after the fact, where something changed. It's closer to a profiler for data shape than to a schema checker.&lt;/p&gt;

&lt;p&gt;So the rule of thumb is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;Pandera / Great Expectations&lt;/strong&gt; when you know your expectations and want to enforce them.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;&lt;code&gt;dframe-trace&lt;/code&gt;&lt;/strong&gt; when something is &lt;em&gt;already&lt;/em&gt; wrong and you need to find which step did it — or when you want a cheap, always-on record of how data flows through a script.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They're complementary; nothing stops you from using both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Catching regressions in CI
&lt;/h2&gt;

&lt;p&gt;Once you've found a bug, you usually want to make sure it stays fixed. A trace can become a build-failing assertion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dframe_trace&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;guards&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;run_pipeline&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;guards&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assert_no_new_nulls&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;guards&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assert_no_row_loss&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;allow&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;filter&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;    &lt;span class="c1"&gt;# allow expected drops
&lt;/span&gt;&lt;span class="n"&gt;guards&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assert_no_silent_casts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;allow&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;astype&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each guard raises with a structured list of violations — "merge introduced 2 null(s) in 'region'" — so a failing build tells you exactly what regressed and where.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it expensive to leave on?
&lt;/h2&gt;

&lt;p&gt;No, and that's deliberate. A snapshot is &lt;strong&gt;structural only&lt;/strong&gt;: row count, column names, dtypes, per-column null counts, and estimated memory. No row values are ever copied or stored. Outside an active &lt;code&gt;trace()&lt;/code&gt; block, &lt;code&gt;autopatch&lt;/code&gt; adds a single &lt;code&gt;is None&lt;/code&gt; check per call. That's cheap enough to leave installed in development without thinking about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;p&gt;A debugging tool you can't trust is worse than none, so here's what it doesn't do yet:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boolean-mask filtering&lt;/strong&gt; (&lt;code&gt;df[df.x &amp;gt; 0]&lt;/code&gt;) isn't auto-traced — it goes through &lt;code&gt;__getitem__&lt;/code&gt;, which is too broad to patch safely. The row loss still shows up in the &lt;em&gt;next&lt;/em&gt; recorded step's delta; for precise attribution, wrap that step in &lt;code&gt;@traced&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;groupby&lt;/code&gt;&lt;/strong&gt; terminal methods aren't traced yet (it's on the roadmap).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;polars support is newer&lt;/strong&gt; than the pandas path, which is more thoroughly tested.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a young project and a debugging aid, not a correctness guarantee.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;If you've ever lost an afternoon to a pipeline that returned the wrong number for no obvious reason, this is built for exactly that afternoon.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;dframe-trace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PyPI:&lt;/strong&gt; &lt;a href="https://pypi.org/project/dframe-trace/" rel="noopener noreferrer"&gt;https://pypi.org/project/dframe-trace/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://github.com/vimalnakrani08/dframe-trace" rel="noopener noreferrer"&gt;https://github.com/vimalnakrani08/dframe-trace&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Issues and pull requests are welcome — there are tagged good-first-issues on the roadmap (&lt;code&gt;groupby&lt;/code&gt; tracing, Mermaid lineage export, more guards) if you want to contribute. And if you try it on a real pipeline, I'd genuinely like to hear what it caught — or missed.&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>pandas</category>
      <category>dataengineering</category>
    </item>
  </channel>
</rss>
