We’re excited to announce a powerful new feature in Anaconda Code: Python User-Defined Functions! With UDFs, you can write Python functions and use them just like native Excel functions, bringing the full power of Python’s rich data science ecosystem directly to your spreadsheet formulas. Let’s look at a real-world example that showcases how powerful this integration can be.
From Cross-Tab to Long Format in One Function Call
Consider a common data reshaping challenge: converting cross-tabulated (wide) data into a long format. You’re probably thinking, “Well, I can do that with Power Query no problem.” Yes, true. But the resulting Table isn’t dynamic. Every time the input data changes, the query needs to be refreshed. And the query is tied to that one workbook. With Anaconda Code and Anaconda Toolbox, you can create a Python UDF, save it as a Code Snippet, and have it available in any workbook you open. Plus, the code needed to quickly unpivot a wide-format …