Formulas & Excel logic

Python in Excel

The =PY() formula: referencing ranges with xl(), returning DataFrames and plotting in cells.

A Python in Excel cell containing a =PY formula that reads a table with xl() and returns a DataFrame, which spills into the sheet as values.A Python in Excel cell containing a =PY formula that reads a table with xl() and returns a DataFrame, which spills into the sheet as values.Python inside the grid, run in the cloudAB1RegionSales2North4103South38845=PY(xl("A1:B3").describe())spillsDataFramecount · mean · stdas cell values

Start with the full guides

The long-form treatment of python in excel, with the reasoning the shorter pages assume.

Step-by-step how-tos

One task each, with code you can copy, run and adapt.

Compare the options

Which tool or approach to pick, and why.

When it breaks

The errors this topic produces, with the cause explained rather than just the fix.

Follow it through a track

Prefer an ordered route? These tracks cover python in excel along the way, in the order that builds on itself.

Related topics

Subjects that keep turning up on the same pages as this one, most overlap first.

Python in Excel is part of Formulas & Excel logic.