Dataframe Memory Project
This tools aims to provide simple solution to save memory when using pandas' data frame. It is highly inspired by this kaggle post.
Usage
from data_memory import reduce_memory
import numpy as np
import pandas as pd
df = pd.DataFrame(
np.array(
[[1, 2, "aaa"],
[4, 5, "bbb"],
[7, 8, "ccc"]] * 10000),
columns=['a', 'b', 'c'])
reduce_memory(df, method="exact", verbose=True)
Yields the following decrease of memory
Memory usage input: 5.04 MB
Memory usage output: 0.09 MB
Decreased by: 98.28 %
df.info()
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 a 30000 non-null category
1 b 30000 non-null category
2 c 30000 non-null category
Metadata
Release files for dataframe-memory 2023.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dataframe_memory-2023.3.1.tar.gz | 8.5 kB | Without provenance | Details for dataframe_memory-2023.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dataframe_memory-2023.3.1-py3-none-any.whl | Python 3 | none | any | Details for dataframe_memory-2023.3.1-py3-none-any.whl |
Total release size: 21.0 kB
Release files / dataframe_memory-2023.3.1.tar.gz
| Download URL | dataframe_memory-2023.3.1.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0e5c25fb4fc4259447472d0f3d12661ec4004a0ed55d47ed6939aab3bcc3ac0
|
|
BLAKE2b-256 checksum How to use checksums |
ae5075f3dc4c64d9ddacfaa49dde202774e5e400d31d4e43e254ee361be752c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / dataframe_memory-2023.3.1-py3-none-any.whl
| Download URL | dataframe_memory-2023.3.1-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4c95977fc91b4fe7b73ee2fd2d8cf807e441dcad3ea949843f5bc796b2c34ce
|
|
BLAKE2b-256 checksum How to use checksums |
db382be0715587f232ee9b9806e6bbf074c99078393699fe59354ed60ff558a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for dataframe-memory 2023.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.