accudata-1.0.1
توضیحات
Simple module to store data with arbitrary structure in dict or Pandas DataFrame
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | accudata-1.0.1 |
| نام | accudata |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Pavel Gostev |
| ایمیل نویسنده | gostev.pavel@physics.msu.ru |
| آدرس صفحه اصلی | https://github.com/vongostev/accudata |
| آدرس اینترنتی | https://pypi.org/project/accudata/ |
| مجوز | - |
### 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:
1. Numbers
2. Lists / arrays
3. 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:
1. Name of a person
2. Age
3. Interests
4. Preferences by categories: food, pets, sport, politics
You can make a class:
```python
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:
```python
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:
```python
names = Data.name
# Make the dataframe
dataframe = Data.todf()
print(dataframe.name)
```
نیازمندی
| مقدار | نام |
|---|---|
| - | numpy |
| - | pandas |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl accudata-1.0.1:
pip install accudata-1.0.1.whl
نصب پکیج tar.gz accudata-1.0.1:
pip install accudata-1.0.1.tar.gz