Do you collect a heterogeneous data step by step?
Here you find a convinient solution of this problem. class AccumulativeData provides a simple interface to store data step by step. The data can be consisted of:
- Numbers
- Lists / arrays
- Objects
You can store it as pickled object or Pandas Dataframe.
Installation
The module can be installed from pip
pip install accudata
For example
You have a social data collecting process. You must collect on every step heterogeneous data:
- Name of a person
- Age
- Interests
- Preferences by categories: food, pets, sport, politics
You can make a class:
from accudata import AccumulativeData
class PeopleAccData(AccumulativeData):
def __init__(self):
lists = ['name', 'age', 'interests']
dicts = {'pref': ['food', 'pets', 'sport', 'politics]}
super().__init__(lists=lists, dicts=dicts)
After that you can make an iterative collecting process as follows:
Data = PeopleAccData()
for item in raw_data:
Data.next()
# \\\ A complicated code to extract data
name, age, interests, food, pets, sport, politics, _ = extract_data(item)
Data.append(name, age, interests,
pref=[food, pets, sport, politics])
It is simple to get data:
names = Data.name
# Make the dataframe
dataframe = Data.todf()
print(dataframe.name)
Metadata
Release files for accudata 1.0.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 |
|---|---|---|---|---|
| accudata-1.0.1.tar.gz | 3.4 kB | Without provenance | Details for accudata-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| accudata-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for accudata-1.0.1-py3-none-any.whl |
Total release size: 7.1 kB
Release files / accudata-1.0.1.tar.gz
| Download URL | accudata-1.0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df800255dc252bf63937b0094453bdaf65e09772c3f51d808b9cd44d814d9cfd
|
|
BLAKE2b-256 checksum How to use checksums |
9338f80ba4e4167141e71cb74e927c341762dfab547c3de828af1fb7d13eb8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / accudata-1.0.1-py3-none-any.whl
| Download URL | accudata-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
199daf344ac0c83c1b3f0245973f6457b060a0661b609e22a69d427157a7d9b9
|
|
BLAKE2b-256 checksum How to use checksums |
b81d116cc658a72e27bf5c6381b6733f4af14797dc719e1bcc955614cef45b68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for accudata 1.0.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.