0

I'm using pyinstaller to generate an executable from my code. That is working as expected. The problem is the file size being over 30 MB. I only need the methods read_csv and read_excel from the pandas library. Is there a way for me to maybe exclude everything else except read_csv and read_excel?

I'm calling the methods in my code with the following.

from pandas import read_excel
from pandas import read_csv
beaugotro
  • 31
  • 8
  • 2
    Those functions return DataFrame objects, so not only do you need those functions, you also implicitly need all DataFrame code as well (along with any code needed by those functions or DataFrames). So, while it may technically be possible to (a) find the subset of code you need from pandas and (b) repackage this code into your own module, both parts of this would be nontrivial and the resulting code may not end up being significantly less than the whole package (no idea on that). – Jared Goguen Jun 21 '18 at 15:31
  • Take a look at [this question](https://stackoverflow.com/questions/47692213/reducing-size-of-pyinstaller-exe?rq=1) though as your issue may not even be related to pandas. – Jared Goguen Jun 21 '18 at 15:42

0 Answers0