Dictionary of Series - a kind of pandas extension
Project description
DictOfSeries
DictOfSeries is a pandas.Series of pandas.Series objects which aims to behave as similar as possible to pandas.DataFrame.
Nomenclature
- series/ser: instance of pandas.Series
- dios: instance of dios.DictOfSeries
- df: instance of pandas.DataFrame
- dios-like: a dios or a df
- alignable object: a dios, df or a series
Features
- every column has its own index
- uses much less memory than a misaligned pandas.DataFrame
- behaves quite like a pandas.DataFrame
- additional align locator (
.aloc[]
)
Install
todo: PyPi
import dios
# Have fun :)
Documentation
The main docu is on ReadTheDocs at:
but some docs are also available local:
TL;DR
get it
>>> from dios import DictOfSeries
empty
>>> DictOfSeries()
Empty DictOfSeries
Columns: []
>>> DictOfSeries(columns=['x', 'y'])
Empty DictOfSeries
Columns: ['x', 'y']
>>> DictOfSeries(columns=['x', 'y'], index=[3,4,5])
x | y |
====== | ====== |
3 NaN | 3 NaN |
4 NaN | 4 NaN |
5 NaN | 5 NaN |
with data
>>> DictOfSeries([range(4), range(2), range(3)])
0 | 1 | 2 |
==== | ==== | ==== |
0 0 | 0 0 | 0 0 |
1 1 | 1 1 | 1 1 |
2 2 | | 2 2 |
3 3 | | |
>>> DictOfSeries(np.random.random([2,4]))
0 | 1 |
=========== | =========== |
0 0.112020 | 0 0.509881 |
1 0.108070 | 1 0.285779 |
2 0.851453 | 2 0.805933 |
3 0.138352 | 3 0.812339 |
>>> DictOfSeries(np.random.random([2,4]), columns=['a','b'], index=[11,12,13,14])
a | b |
============ | ============ |
11 0.394304 | 11 0.356206 |
12 0.943689 | 12 0.735356 |
13 0.791820 | 13 0.066947 |
14 0.759802 | 14 0.496321 |
>>> DictOfSeries(dict(today=['spam']*3, tomorrow=['spam']*2))
today | tomorrow |
======= | ========== |
0 spam | 0 spam |
1 spam | 1 spam |
2 spam | |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dios-0.6.0.tar.gz
(29.9 kB
view details)
Built Distribution
dios-0.6.0-py3-none-any.whl
(26.8 kB
view details)
File details
Details for the file dios-0.6.0.tar.gz
.
File metadata
- Download URL: dios-0.6.0.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ff173ecccf15ba05f907113d7219a0d8818d74de3412c54abaab8bd22133bde |
|
MD5 | 3cfd4ccc0ccbad8a4d2a8c00ed24d973 |
|
BLAKE2b-256 | 11678fbe4bd2f95f973b0a350c14b3494df84013c4995091ad909e3016c88b00 |
File details
Details for the file dios-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: dios-0.6.0-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e66595dd9080266a0198f9d6d3335644b8df6b60068479616e4ace0999d7455 |
|
MD5 | e4854d288bd740be1ed52383158e13fc |
|
BLAKE2b-256 | 3e31c9a4e055b26005e3f39e65b3d7fdee14d7d784f25af708f6c200ddc695b8 |