Formulaic is a high-performance implementation of Wilkinson formulas for Python. https://github.com/matthewwardrop/formulaic It's probably worth transitioning to it once it matures.