lightweight alternative for pandas

Viewed 7629

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
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.

Related