pybroom

Make tidy DataFrames from messy fit/model results.


Keywords
dataframe, tidy-data, long-form, model, fitting, tidyverse
License
MIT
Install
pip install pybroom==0.2

Documentation

pybroom

pybroom, the python's broom to tidy up messy fit results!

Pybroom is a small python 3 library for converting fitting results (curve fitting or other optimizations) to Pandas DataFrame in tidy format (Wickham 2014). DataFrames in tidy format (or long-form) follow a simple rule: one "observation" per row and one "variable" per column. This simple structure makes it easy to process the data with clear and well-understood idioms (for filtering, aggregation, etc.) and allows plot libraries to automatically generate complex plots in which many variables are compared. Plotting libraries supporting tidy DataFrames include seaborn, recent versions of matplotlib, bokeh and altair. pybroom development was inspired by the R library broom.

Like the R library broom, pybroom provides 3 functions: tidy, augment and glance.

For details see the documentation which includes example notebooks (you can find the source notebooks in docs/notebooks).

Pybroom was started after watching this presentation by David Robinson (broom's author):