Tutorial Boost your Data Science skills with the new Python in Excel [PyCon DE & PyData Berlin 2024]

Learn how to leverage Python in Excel's cloud-based features, understand key limitations, and master best practices for data science workflows in this hands-on tutorial.

Key takeaways
  • Python in Excel runs in a sandboxed Azure cloud environment - no local Python installation needed but requires internet connection

  • Limited to pre-installed libraries from Anaconda distribution (NumPy, Pandas, Matplotlib, etc.) - cannot install additional packages

  • Execution model follows 3D workflow: left-to-right, top-to-bottom across worksheets, similar to Jupyter notebooks

  • Python cells have two modes:

    • Object mode (shows Python object representation)
    • Value mode (displays actual values/results)
  • Code lives within the workbook - no external module imports or file system access possible

  • 100MB limit per cell for data + code execution

  • No debugging capabilities currently available

  • Best practices:

    • Keep Python code short and modular
    • Add documentation strings
    • Use Excel Labs add-in for better editing experience
    • Reset runtime when encountering errors
  • Data visualization possible through matplotlib/seaborn, outputs display as embedded images

  • No integration with version control systems or external IDEs

  • Currently Windows-only feature, still in beta

  • All execution happens in isolated sandbox - Microsoft cannot access data or code