Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lightweight alternative for pandas

I am trying to create an AWS lambda function written in Python.
Lambda function create fails with following error:

Unzipped file size must be smaller than 262144000 bytes.

Following is my requirements.txt

numpy
pandas
pprint
pint
flask
scipy
gunicorn
pydblite
jsonschema
matplotlib
sklearn

After removing all test, *.pyc and *-info* files following packages are the top contributors to the volume.

scipy  126M
pandas 64M
numpy  64M
matplotlib 29M

I have replaced pandas' read_excel with xlsx.

If there is any way I can get size reduced version of packages, that would be great. Otherwise, looking for alternatives of:

  • pandas's DataFrame
like image 444
kn_pavan Avatar asked Sep 26 '17 06:09

kn_pavan


1 Answers

As @Kodiologist suggested, had switched to numpy arrays. As I already have numpy as dependency, this turned out to be a better alternative to DataFrame of pandas.

like image 193
kn_pavan Avatar answered Sep 25 '22 16:09

kn_pavan