Fireship · @fireship

Microsoft Excel just got Python

Uploaded August 23, 2023 · Length 2:59

Microsoft Excel just got Python

Summary

Microsoft Excel now supports Python, allowing developers to write custom functions, analyze data, and perform machine learning tasks directly in the spreadsheet.

  • microsoft excel python
  • excel python integration
  • data analysis in excel
  • python in spreadsheets
  • machine learning in excel

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    is August 23 2023 and you're watching

  2. 0:02

    the code report most developers will

  3. 0:04

    never admit it but that game-changing

  4. 0:06

    new app they're building probably could

  5. 0:07

    have just been an Excel spreadsheet

  6. 0:08

    Excel which came out in 1985 could be

  7. 0:11

    the single most important piece of

  8. 0:12

    software for our modern service-based

  9. 0:14

    economy working with Excel formulas at

  10. 0:15

    my dead end white collar job is actually

  11. 0:17

    where I got my first taste of

  12. 0:18

    programming I used formulas to figure

  13. 0:20

    out that I would never be able to own a

  14. 0:21

    house unless I got a higher paying job

  15. 0:23

    but you can't do real programming with

  16. 0:24

    Excel it is possible to hook it up with

  17. 0:26

    Visual Basic but that's just way too

  18. 0:28

    microsofty luckily as of yesterday

  19. 0:30

    Microsoft Excel will now support python

  20. 0:32

    a feature developed in collaboration

  21. 0:34

    with the creator of python Guido van

  22. 0:36

    Rossum which is totally awesome here's

  23. 0:37

    how it'll work in Excel you have access

  24. 0:39

    to this new Pi formula which can run

  25. 0:41

    python code against the data in your

  26. 0:43

    spreadsheet like for example if you want

  27. 0:45

    to put your data into a pandas data

  28. 0:47

    frame you can now accomplish that by

  29. 0:48

    simply highlighting your data and

  30. 0:49

    running the corresponding python code

  31. 0:51

    another huge benefit is the ability to

  32. 0:53

    use Python database packages like

  33. 0:55

    Seabourn and matplotlib more importantly

  34. 0:57

    though it allows developers to write

  35. 0:58

    their own custom functions that can

  36. 1:00

    Wrangle and clean real world data sets

  37. 1:02

    which can be fed to the hungry AIS in

  38. 1:04

    fact you could even do machine learning

  39. 1:05

    directly in your spreadsheet with tools

  40. 1:07

    like scikit learn that's pretty cool but

  41. 1:09

    don't expect it to train deep learning

  42. 1:11

    models with tools like pytorch and

  43. 1:12

    tensorflow and that brings us to the one

  44. 1:14

    major caveat the industry transformation

  45. 1:17

    the key to success is your python code

  46. 1:21

    does not run locally but instead runs in

  47. 1:23

    Microsoft's Azure Cloud this will of

  48. 1:25

    course keep you safe from the dangers of

  49. 1:26

    spreadsheets and also from the hull that

  50. 1:28

    is managing your python versions locally

  51. 1:30

    they teamed up with Anaconda to create a

  52. 1:32

    standard runtime for running Python and

  53. 1:34

    Excel in Azure however being able to run

  54. 1:36

    python locally offline is far more

  55. 1:38

    privacy friendly and would be faster in

  56. 1:39

    most situations the only problem is that

  57. 1:41

    Microsoft then wouldn't have a product

  58. 1:42

    to sell you you could switch to Linux

  59. 1:44

    and run LibreOffice which has support

  60. 1:46

    for macros in both JavaScript and python

  61. 1:48

    it has had those features forever but

  62. 1:49

    good luck convincing your boss that's a

  63. 1:51

    good idea it's just too free and too

  64. 1:52

    open source Python and Excel is going to

  65. 1:54

    be a game changer for the boring ass

  66. 1:56

    corporate world where the last few years

  67. 1:57

    I've been using Google Sheets with apps

  68. 1:59

    script which is one of the most