If pd.read_excel() is taking a long time, the cause is almost always one of four things: the file is being parsed by the slow openpyxl engine, the workbook contains formatting, images or formulas that pandas must walk through, you are reading the same file repeatedly, or the file is still an .xlsx when it could be a plain .csv. The fastest fix is to convert the sheet to CSV once and read that instead; the second fastest is to install python-calamine and pass engine="calamine", which parses .xlsx files far quicker than openpyxl. Below is a practical, ordered set of changes that usually takes a slow read from minutes to seconds.

What You'll Need

  • Python 3.9 or newer with pandas installed, plus openpyxl (the default .xlsx engine).
  • A terminal or notebook where you can install packages with pip.
  • The Excel file you are reading, and a rough idea of its size (rows, columns, number of sheets).
  • Optional but recommended: python-calamine for fast .xlsx parsing, and pyarrow if you plan to cache to Parquet.

Step-by-Step

  1. Measure before you change anything. Time the current read so you can tell whether a fix actually helped. In a script or notebook, wrap the call in time.perf_counter() and print the elapsed seconds. Also note the file size on disk and the row count of the result. Without a baseline you will be guessing.
  2. Read only the sheet you need. By default read_excel reads the first sheet, but if you are passing sheet_name=None you are parsing every sheet in the workbook. Pass the exact sheet name, for example pd.read_excel(path, sheet_name="Data"). On workbooks with many tabs this alone can cut the time dramatically.
  3. Restrict the columns and rows. Use usecols to load only the columns you actually need, and nrows if you only need a preview or a fixed chunk. Both options reduce the amount of cell data pandas has to construct, which is where most of the time goes on wide sheets.
  4. Switch the engine. openpyxl is pure Python and slow on large files. Install python-calamine with pip, then call pd.read_excel(path, engine="calamine"). Calamine is a Rust-based reader and is typically several times faster on .xlsx. If your file is legacy .xls, the xlrd engine is the one to use; note that xlrd no longer supports .xlsx.
  5. Strip the formatting problem at the source. If the workbook has thousands of styled empty rows, merged cells, images, conditional formatting or data validation across huge ranges, the parser still has to walk that structure. Open the file in Excel, delete unused rows and columns (select them and delete, do not just clear contents), remove images and unneeded formatting, then save a clean copy. This often matters more than any pandas option.
  6. Convert to CSV or Parquet once. If the file is a data export that does not change, open it in Excel and use File > Save As > CSV UTF-8 (Comma delimited), then read it with pd.read_csv(), which is much faster than any Excel parser. For repeated use inside Python, read the Excel file once and write it to Parquet with df.to_parquet(); later reads of the Parquet file are typically an order of magnitude faster and preserve data types.
  7. Cache the result in memory. If the same workbook is read more than once in a session (for example inside a loop or a dashboard callback), read it once at startup and keep the DataFrame in a variable or a module-level cache. Re-reading the file on every request is the single most common cause of a slow app.
  8. Check where the file lives. Reading from a network drive, a synced cloud folder or a slow USB stick adds latency that looks like a pandas problem. Copy the file to a local disk first and time it again. Similarly, avoid reading from inside a OneDrive or Dropbox folder that is actively syncing.
  9. Set the dtype explicitly. On large sheets, letting pandas infer types column by column costs time and memory. Pass a dtype dictionary for the columns you know are integers, floats or strings. This is a smaller win than engine choice but it compounds with the other steps.
  10. Re-time and compare. Run the same measurement from step 1 with the new code. If the gain is small, revisit step 5: a bloated workbook is usually the real culprit, and no pandas option fully compensates for it.

Common Mistakes

  • Assuming the engine does not matter. The default openpyxl path is the slowest option for .xlsx and is often the whole problem.
  • Leaving sheet_name=None in place after debugging, which parses every tab in the workbook.
  • Clearing cell contents in Excel instead of deleting the rows and columns, which leaves the used range large and keeps the parse slow.
  • Reading the file inside a loop or a web request handler instead of once at startup.
  • Converting to CSV but forgetting that CSV loses data types and date formatting, so dates arrive as strings and need parsing.
  • Timing a read from a network share and blaming pandas for the latency.

Tips

  • Keep the original .xlsx untouched and write cleaned or converted copies to a separate folder, so you can always re-derive the data.
  • For dashboards and scripts that run repeatedly, Parquet is usually the best cache format: it is compact, typed, and fast to read.
  • If the workbook is genuinely huge (hundreds of thousands of rows), consider whether Excel is the right format at all; a database or CSV export is a better long-term source.
  • Log the read time in your script so regressions are visible when someone sends you a new, heavier workbook.
  • When sharing code, pin the engine explicitly rather than relying on whatever pandas picks by default.

Troubleshooting

If read_excel raises an ImportError mentioning an engine, install the missing package with pip (openpyxl for .xlsx, xlrd for .xls, python-calamine for the calamine engine) and confirm you are installing into the same Python environment that runs your script.

If the read still feels slow after switching engines, open the file and check the used range: press Ctrl+End in Excel to see where the last used cell is. If it lands far beyond your actual data, delete the trailing rows and columns and save.

If values come back wrong after converting to CSV, check the encoding (use CSV UTF-8) and re-apply date parsing with parse_dates. If numbers arrive as text, the original cells were probably stored as text in Excel.

If memory runs out rather than time, read in chunks with nrows and skiprows, or convert to Parquet and read only the columns you need.

Frequently Asked Questions

Why is read_excel slower than read_csv?

Excel files are compressed XML archives with styling and structure, so the parser must unzip and interpret far more than a flat text file. CSV is a plain stream of characters, which pandas can parse directly.

Is calamine safe to use?

Yes. It is an open-source Rust library with a pandas-compatible engine, installed from PyPI, and it reads .xlsx and .xlsb files without needing Excel installed.

Can I read only part of a sheet?

Yes. Use usecols for columns and nrows with skiprows for row ranges. Both reduce parse work and memory use.

Does the number of sheets affect speed?

Only if you ask for all of them. Reading a single named sheet skips the rest.

Will converting to Parquet change my data?

It preserves values and types, but formatting such as cell colours and merged cells is not carried over, since those are presentation, not data.

Why does the first read take longer than later ones?

The operating system caches the file after the first read, so subsequent reads from local disk are faster. This is also why network drives feel slow every time.