Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

microdf documentation

microdf provides weighted data structures for survey microdata analysis in Python. MicroSeries and MicroDataFrame carry sampling weights inside the object, so the weights stay aligned with their rows through merges, filters, grouping and reindexing, and the weighted estimators — quantiles, variance, Gini, top shares, poverty rates — use documented conventions rather than ad hoc ones.

import microdf as mdf

df = mdf.MicroDataFrame({"income": [10_000, 30_000, 120_000]}, weights=[800, 1_200, 50])
df.income.median()  # 30000, weighted
df.income.gini()

Install with pip install microdf-python.