tl;dr: we built a Google Sheets extension that lets you run Python in your spreadsheet.<p>Hello HN! Douwe and Jack here - we’re the founders of Neptyne, a Python powered spreadsheet. We launched here in February and our users like the product but some of them also let us know they can’t always switch spreadsheets just to be able to use Python.<p>So we built an add-on that lets you use Python from Google Sheets. You can try it here:
<a href="https://workspace.google.com/marketplace/app/neptyne_python_for_sheets/891309878867" rel="nofollow noreferrer">https://workspace.google.com/marketplace/app/neptyne_python_...</a><p>Our add-on gives you a code panel next to your spreadsheet where you can define functions in Python. For each active spreadsheet, we spin up a jupyter kernel and every time you edit the code, we evaluate the code in that kernel. The add-on introduces one new function (formula), Py(). It takes the name of a python function and a list of parameters. When the formula evaluates, we send that off to the kernel and return the result to the spreadsheet.<p>There's a cost to running custom functions in Sheets, so there's a minimum latency of around a second. Python functions can only read their inputs and write to the current cell (though multi dimensional data will spill which allows you to return a table for example from a dataframe). We’re working on making buttons and graphs work, but it doesn’t work out of the box.<p>Our standalone product doesn’t have these restrictions, but then again being able to run Python from Google Sheets to us still feels like magic!