Data import and analysisMicrosoft 365 · qualifying plans

PY

Type =PY and select it from autocomplete to open the Python editor. Excel generates the underlying function when you run the code.

Syntax

=PY(python_code, return_type)

Microsoft documentation

Check the arguments, supported editions and behavior of this function in Microsoft’s reference.

Microsoft reference

Search ExcelTutor