Member-only story
A Simple Trick to Load Multiple Excel Worksheets in Pandas
A quick guide on loading Excel files with multiple worksheets in an efficient way
In my day-to-day job, I work with Excel files quite a lot — taking Excel files, most of which containing multiple worksheets and loading them into Python using Pandas for a variety of tasks. I found this process to be rather cumbersome, until a fellow co-worker (thanks Gab Lin!) taught me a simple trick that henceforth allows me to do this task more intuitively and efficiently. Allow me to pay it forward in this article!🙂
The codes presented in this article can be found at this GitHub repo.
The Data
Before getting to the crux, let’s first look at the following Excel file which I have created and will be using for illustrations.
It contains fictitious (and very simple) sales data across three consecutive months — January to March. The sales data for each month is shown in separate worksheets.