MakeTables

A Python package for creating publication-ready tables from regression results (statsmodels, pyfixest, linearmodels), descriptive statistics, and balance tables with output to LaTeX, Word, and HTML via Great Tables.

Overview

MakeTables provides a unified interface for generating tables such as:

The package supports multiple output formats including:

  • Great Tables (HTML)
  • LaTeX
  • Microsoft Word (docx) documents
NoteDevelopment Status

MakeTables is in early stage development. Bug reports through GitHub Issues are highly welcome.

Origin

MakeTables originated as the table output functionality within the PyFixest package and has been moved to this standalone package to provide broader table creation capabilities and support other statistical packages.

Authors

Installation

From PyPI

pip install maketables

Development Installation

git clone https://github.com/dsliwka/maketables.git
cd maketables
pip install -e .

Quick Example

import pandas as pd
import maketables as mt
import pyfixest as pf

# Load your data (here using a sample Stata dataset with the import_dta function that also stores variable labels)
df = mt.import_dta("https://www.stata-press.com/data/r18/auto.dta")

# Create descriptive statistics table
mt.DTable(df, vars=["mpg","weight","length"], bycol=["foreign"])

# Fit your models (here using pyfixest)
est1 = pf.feols("mpg ~ weight", data=df)
est2 = pf.feols("mpg ~ weight + length", data=df)

# Make a regression table
mt.ETable([est1, est2])

Get Started