Skip to main content

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()

# John have increase pays in february
        'John': 130000,

# March have no any differences, that layer is empty
l.add_layer({}, '2017-03')

# In April Sara groing up
        '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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
laminated- (2.6 kB) Copy SHA256 hash SHA256 Source None Dec 31, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page