Dictionary like object with layers support
Project description
Laminated provide dictionary like object with the layers support. The general suppose is a data set with fluctuations in differents pieces.
Quick Examples
Example 1
from laminated import Laminated
# The company FOO has employeers with this paymenths in month
inition_employee_pay = {
'John': 120000,
'Mike': 150000,
'Sara': 80000,
'David': 60000,
}
l = Laminated()
l.add_layer(
name='2017-01',
data=inition_employee_pay,
)
# John have increase pays in february
l.add_layer(
name='2017-02',
data={
'John': 130000,
},
)
# March have no any differences, that layer is empty
l.add_layer({}, '2017-03')
# In April Sara groing up
l.add_layer(
name='2017-04',
data={
'Sara': 100000,
},
)
# how many company FOO spend money on they workers by months
amount = 0
for month in l.get_layers_names():
for employee in l:
amount += l.get_value_at_layer(month, employee)
# the result will be 1690000
print('Total amount of pays is {}'.format(amount))
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
laminated-0.1.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file laminated-0.1.tar.gz
.
File metadata
- Download URL: laminated-0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2276678284fc8a1c42cae07b4b3c45e77675e6e4790aa25c1820eb08baeed66a |
|
MD5 | 23269cd2e730fda146c42ac861f6d452 |
|
BLAKE2b-256 | c872f5a586b70e0e58f3076d672e3b9e3af9d67f993f6717dce1fc8333fcd3af |
File details
Details for the file laminated-0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: laminated-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 811f46eb449cab3c091a731b935df90dee144e388e5d4bccdc38ecbffd083c2d |
|
MD5 | 3362dec90dde550c30b48a3ff9c524dd |
|
BLAKE2b-256 | f7d9e4d493a34af5f0ac2f630741ed75580a04cc5e74511ad051767232fc5779 |