<?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: Ab</title>
    <description>The latest articles on DEV Community by Ab (@abhishekrai43).</description>
    <link>https://dev.to/abhishekrai43</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3965718%2F47e39f2f-aeb1-4330-9138-06b6c3d7518f.png</url>
      <title>DEV Community: Ab</title>
      <link>https://dev.to/abhishekrai43</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhishekrai43"/>
    <language>en</language>
    <item>
      <title>csvtidy: merge and clean CSV files from the terminal, with reusable recipes</title>
      <dc:creator>Ab</dc:creator>
      <pubDate>Tue, 30 Jun 2026 08:32:06 +0000</pubDate>
      <link>https://dev.to/abhishekrai43/csvtidy-merge-and-clean-csv-files-from-the-terminal-with-reusable-recipes-2p61</link>
      <guid>https://dev.to/abhishekrai43/csvtidy-merge-and-clean-csv-files-from-the-terminal-with-reusable-recipes-2p61</guid>
      <description>&lt;p&gt;Every month it's the same CSV exports. Same system, same columns, same handful of cleanup steps before the data is usable: drop duplicates, trim whitespace, fix the date column, and stack a dozen files into one.&lt;/p&gt;

&lt;p&gt;Each of the usual options has a catch. Copy-paste is slow, and eventually you paste a header row into the middle of your data and don't notice. A Python script works great until a column moves or the next person on the team can't run it. Power Query is powerful but it's a lot of clicking, and it lives inside Excel.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;csvtidy&lt;/strong&gt; — a small command-line tool for exactly this: clean and merge messy CSV files, and save the steps so you can re-run them on next month's files without rebuilding anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;​&lt;code&gt;pip install csvtidy​&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The basics
&lt;/h2&gt;

&lt;p&gt;Merge every CSV in a folder into one file, tagging each row with the file it came from:&lt;/p&gt;

&lt;p&gt;​&lt;code&gt;csvtidy merge ./exports --output combined.csv --source-column file​&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remove duplicate rows:&lt;/p&gt;

&lt;p&gt;​&lt;code&gt;csvtidy dedupe data.csv --output clean.csv​&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Basic cleanup — trim whitespace, normalize dates, drop empty rows:&lt;/p&gt;

&lt;p&gt;​&lt;code&gt;csvtidy clean data.csv --output clean.csv​&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It reads and writes stdin/stdout, so you can chain steps the Unix way:&lt;/p&gt;

&lt;p&gt;​&lt;code&gt;csvtidy merge ./exports | csvtidy dedupe - | csvtidy clean -​&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Recipes: build once, re-run forever
&lt;/h2&gt;

&lt;p&gt;This is the part I actually care about. Instead of retyping the same steps every month, you save them as a recipe — a small YAML file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;clean&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;trim&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;true&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;fix_dates&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;true&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;dedupe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;subset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;email&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;merge&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;source_column&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;file&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run it against any folder:&lt;/p&gt;

&lt;p&gt;​&lt;code&gt;csvtidy recipe monthly.yaml ./exports --output combined.csv​&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next month, drop the new files in the folder and run the same command. That's the whole idea: the cleanup is reproducible, not redone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why DuckDB under the hood
&lt;/h2&gt;

&lt;p&gt;The thing that makes this more than a pandas wrapper is that csvtidy runs on DuckDB. It streams files instead of loading them fully into memory, so it handles CSVs bigger than your RAM — the ones that make Excel hang and a naive &lt;code&gt;pd.read_csv&lt;/code&gt; fall over. For a tool whose entire job is "merge a folder of large exports," that's the difference between working and crashing on exactly the files that matter most.&lt;/p&gt;

&lt;p&gt;It's fast, and it's all local — nothing leaves your machine, which matters when the files are client, payroll, or finance data.&lt;/p&gt;

&lt;h2&gt;
  
  
  It's open source
&lt;/h2&gt;

&lt;p&gt;csvtidy is MIT-licensed. Code and docs are here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/abhishekrai43/csvtidy" rel="noopener noreferrer"&gt;github.com/abhishekrai43/csvtidy&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Side note: I also build &lt;a href="https://kramata.com" rel="noopener noreferrer"&gt;Kramata&lt;/a&gt;, a desktop app for the same kind of repeatable spreadsheet cleanup — but with a visual recipe builder, for the non-technical people on a team who'd rather click than type. csvtidy is the open-source CLI cousin of that engine.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>showdev</category>
      <category>opensource</category>
      <category>datascience</category>
    </item>
    <item>
      <title>I Visualized My Claude Code Sessions — The Results Were Fascinating</title>
      <dc:creator>Ab</dc:creator>
      <pubDate>Wed, 03 Jun 2026 05:01:44 +0000</pubDate>
      <link>https://dev.to/abhishekrai43/i-visualized-my-claude-code-sessions-the-results-were-fascinating-e9d</link>
      <guid>https://dev.to/abhishekrai43/i-visualized-my-claude-code-sessions-the-results-were-fascinating-e9d</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmopb329mhzuid11uwh8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmopb329mhzuid11uwh8z.png" alt=" " width="800" height="698"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99ysoala87h1921ep87o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99ysoala87h1921ep87o.png" alt=" " width="800" height="686"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uod9ehknl69ys9e6i26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uod9ehknl69ys9e6i26.png" alt=" " width="800" height="700"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wdgag14ksbtipblp0zi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wdgag14ksbtipblp0zi.png" alt=" " width="800" height="666"&gt;&lt;/a&gt;&lt;br&gt;
I built a small tool called &lt;strong&gt;ClaudeActivity&lt;/strong&gt; that parses Claude Code session logs and generates visual HTML reports.&lt;/p&gt;

&lt;p&gt;It shows things like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• repository traversal patterns&lt;br&gt;
• most explored + edited files&lt;br&gt;
• session heatmaps&lt;br&gt;
• coding personas&lt;br&gt;
• token usage + cache hit rates&lt;br&gt;
• project activity over time&lt;br&gt;
• tool usage distribution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The interesting part was realizing how rich Claude Code logs actually are once visualized properly.&lt;/p&gt;

&lt;p&gt;The tool runs fully locally and generates static HTML reports.&lt;/p&gt;

&lt;p&gt;No need to Install, simply run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx claudeactivity scan&lt;/code&gt;&lt;br&gt;
GitHub:&lt;br&gt;
[&lt;a href="https://github.com/abhishekrai43/claudeactivity" rel="noopener noreferrer"&gt;https://github.com/abhishekrai43/claudeactivity&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>ai</category>
      <category>code</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
