0

I'm trying to import an excel sheet of an excel file (17 MB) with following code:

df = pd.read_excel(r'path/excel_file_name.xlsx', sheet_name='payments')

But after a couple minuts it appears a MemoryError. My laptop has 12gb of ram so I don't know what's going on...

jimmy
  • 340
  • 2
  • 13
  • Does this answer your question? [Memory error when using pandas read\_csv](https://stackoverflow.com/questions/17557074/memory-error-when-using-pandas-read-csv) – effy Apr 15 '21 at 20:24
  • Nope, neither of those solutions worked. – jimmy Apr 15 '21 at 20:55
  • Just as a test, have you tried converting your excel sheet to a CSV file and seeing if it works with read_csv? Would be really hard to comment without having access to the file and not knowing the version of pandas and python you are using, might also be OS specific. – hegdep Apr 15 '21 at 22:09
  • 1
    It worked! But i'd like to understand why it's happening. 17 MB is not that big and a couple months ago I imported the same file excel without any problem. I'm using python 3.9 and pandas 4.3.1 – jimmy Apr 15 '21 at 22:25

0 Answers0