Turn generated code into functions

This documentation explains how to convert the Mito generated code into a Python function to make it even easier to reuse the code Mito generates.

Why convert the Mito generated code to a function

Functions make it easy to reuse the code you generated over and over again. In particular, they make it easy to apply the same code to multiple data sets.

How to convert Mito generated code to a function

If you're a Mito Enterprise user, you can have Mito automatically generate code as Python functions.
  1. 1.
    Click on Code > Configure Code
  2. 2.
    In the taskpane, toggle Generate Function on
  3. 3.
    Give the function a name
The Mito generated code will automatically update to generate a function. As you continue to edit the Mito spreadsheet, the function will update.