Turn generated code into functions

Convert the Mito generated code into a Python function to make it even easier to reuse.

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.

Functions in Python are similiar to formulas in Excel.

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. Open the Code tab in the toolbar.

  2. Click on Configure Code

  3. In the taskpane, toggle Generate Function on

  4. 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.

Last updated