Skip to content

Add Stata (.dta) file format support#760

Merged
MaxGhenis merged 1 commit intomainfrom
add-stata-support
Mar 29, 2026
Merged

Add Stata (.dta) file format support#760
MaxGhenis merged 1 commit intomainfrom
add-stata-support

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

Summary

  • Adds support for Stata .dta files as input/output across all CLI subcommands
  • Auto-detects format by file extension (.dta → Stata, everything else → CSV)
  • stdin/stdout default mode remains CSV-only (Stata is binary)
  • New core/io.py module with read_input() / write_output() helpers

Test plan

  • Unit tests for read/write/roundtrip in tests/test_stata_io.py (6 tests, all passing)
  • Manual test with a real Stata dataset from the client

Closes #758

🤖 Generated with Claude Code

Auto-detects format by file extension. Introduces a thin I/O helper
(core/io.py) that dispatches to pd.read_stata/to_stata for .dta files
and falls back to CSV for everything else. The stdin/stdout default
mode remains CSV-only since Stata is a binary format.

Closes #758

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-taxsim Ready Ready Preview, Comment Mar 10, 2026 0:13am

Request Review

@MaxGhenis MaxGhenis marked this pull request as ready for review March 29, 2026 22:35
@MaxGhenis MaxGhenis merged commit cd7eb90 into main Mar 29, 2026
10 checks passed
@MaxGhenis MaxGhenis deleted the add-stata-support branch March 29, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for stata datasets instead of csvs

2 participants