In a previous post I covered how to get started automating Excel with Python using the pandas
and openpyxl
packages:
The previous script will result in the following table:
If you wanted to further customize the table by formatting the body_mass_g
column, widening the columns, or more, you could continue building upon your openpyxl script.
It started with a DataFrame
With openpyxl, pandas, and other Python packages, you can build virtually anything in Excel without even opening the application. And given just how important it is to store your Excel data in tables, this lesson is a great place to start on your Python <> Excel journey.
Have you used openpyx
l or other packages to perform these or other operations? What questions do you have for using Python with Excel? Let me know in the comments.
Want to learn more about Python automation for Excel, working with Excel tables and more? Check out my book Modern Data Analytics in Excel:
Leave a Reply