skills/ds-tables/SKILL.md
Use when building a publication-quality table in Python — 'regression table', 'results table', 'summary statistics table', 'etable', 'coefplot', 'great_tables', 'GT', 'gt table', 'format a table for the paper', 'export table to LaTeX/HTML', significance stars, spanners, or column formatting for a table headed into a paper, slide deck, or notebook.
npx skillsauth add edwinhu/workflows ds-tablesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Two libraries, one stack: pyfixest.etable() builds regression tables and
renders them through great_tables, so anything etable() returns can be
further styled with GT methods. Both render natively in marimo and Jupyter.
| Building | Use | Reference |
|---|---|---|
| Regression results (coefficients, SEs, stars, FE panel) | pf.etable([fit1, fit2]) | references/pyfixest-tables.md |
| Summary stats, descriptives, any DataFrame | GT(df) method chain | references/great-tables.md |
| Coefficient / event-study plot | pf.coefplot(), pf.iplot() | references/pyfixest-tables.md |
| LaTeX or HTML for a manuscript | etable(..., type="tex" \| "html", file_name=...) | references/pyfixest-tables.md |
A table that "looks right" in code is not a table. Before claiming one is done:
GT object, or write the tex/html fileHanding over an unrendered table is NOT HELPFUL — the user pastes it into a paper and discovers the stars are missing at submission time.
etable() prints stars (1.873***) — but the moment you pass coef_fmt yourself, stars come only from a * token in it. coef_fmt="b \n (se)" silently drops the stars you had for free; "b* \n (se)" keeps them. Verified on pyfixest 0.60.0: default → 1.873***, explicit "b \n (se)" → 1.873. signif_code only sets the thresholds, never whether stars render.keep / drop take regex, not names. keep="x1" also matches x10 and log_x1; use r"^x1$" or exact_match=True.etable() returns a great_tables GT object when type="gt" (the default). Reach for the GT method chain for anything etable doesn't parameterize instead of post-processing strings.fmt_* methods take columns= and rows=; omitting both applies the format to the whole table, which is rarely what a mixed-type table wants.coef_fmt without a * token → STOP. You just turned off the stars the default gave you; signif_code will not bring them back.etable() produced → STOP. Round-trip the change through etable()/GT parameters, or the next re-run silently reverts it.import pyfixest as pf
fit1 = pf.feols("y ~ x1 + x2 | fe1", data=df, vcov={"CRV1": "cluster_var"})
fit2 = pf.feols("y ~ x1 + x2 | fe1 + fe2", data=df, vcov={"CRV1": "cluster_var"})
pf.etable(
[fit1, fit2],
coef_fmt="b* \n (se)", # stars REQUIRE the * token
labels={"x1": "Treatment"},
notes="Standard errors clustered by firm.",
)
from great_tables import GT, md
(GT(summary_df)
.tab_header(title="Summary Statistics")
.fmt_number(columns=["mean", "sd"], decimals=2)
.cols_label(mean=md("**Mean**"))
.tab_source_note("Sample: 1996-2024."))
references/pyfixest-tables.md — full etable() parameter reference: coef_fmt tokens, significance codes, keep/drop, labels, model headers, FE display, custom stats, coefplot/iplot, gotchasreferences/great-tables.md — GT constructor, method-chaining pattern, every fmt_* method, column management, headers/spanners, styling, export/marimo, /jupytext — where these tables renderds-implement — the DS phase that produces exhibitsdevelopment
Build the meeting-level proxy-voting × ownership panel on the WRDS SGE grid — ISS N-PX fund votes reduced to (item × block) direction cells, joined to institutional and mutual-fund ownership. Use when working with risk.voteanalysis_npx, N-PX fund-level votes, ISS→CRSP fund linking, index/passive/active voting blocks, or a proxy-voting panel that needs ownership attached.
development
Use when "CRSP CIZ", "CRSP v2", "CRSP flat file format 2.0", "crsp.dsf_v2 / msf_v2", "StkDlySecurityData", "StkMthSecurityData", "StkSecurityInfoHist", "stocknames_v2", "DlyRet / MthRet / DlyPrc / MthPrc", "SHRCD or EXCHCD equivalent in new CRSP", "SIZ to CIZ migration", "CRSP data after 2024", "CRSP delisting returns", "CRSP cumulative adjustment factors", "CRSP index INDNO / INDFAM", or any CRSP stock/index query where the legacy SIZ column names no longer exist.
development
Use when linking or deduping datasets by entity name rather than a shared key — 'fuzzy match', 'fuzzy name matching', 'entity resolution', 'record linkage', 'match company/person names', 'dedupe entity names', 'name-based join', 'bridge identifiers' (CIK ↔ permno ↔ gvkey ↔ wficn ↔ EIN ↔ personid), or any use of char n-gram TF-IDF, cosine similarity on names, `sparse_dot_topn`, or RapidFuzz at scale.
development
Use this skill to BUILD a Word manuscript from LAW AND ECONOMICS markdown — author-date citations plus a reference list, double spaced throughout, Latin Modern typography — for the Journal of Law and Economics, Journal of Legal Studies, JLEO, ALER, or an econ-flavored job market paper. NOT 'law-review-docx' (that is footnote/Bluebook law review style with small caps and a TOC — different discipline, different citation model), NOT the generic 'docx' skill (which edits docx content), NOT 'docx-render' (which only converts an existing .docx to PDF). Triggers: 'build the L&E paper', 'law and economics Word template', 'JLE submission docx', 'Journal of Legal Studies format', 'JLEO manuscript', 'author-date Word document', 'econ job market paper in Word', 'Chicago author-date docx', 'make the submission docx for JLE'.