echemdb / unitpackage

A Python library to interact with a collection of frictionless datapackages
https://echemdb.github.io/unitpackage/
GNU General Public License v3.0
4 stars 3 forks source link

Add slicing to `__getitem__` and db creation from multiple identifiers #21

Open DunklesArchipel opened 1 year ago

DunklesArchipel commented 1 year ago

Currently, we can only select entries in the database from a single identifier

from unitpackage.collection import Collection
db = Collection()
entry = db['identifier']

We could add support to create a new database from multiple identifiers

new_db = db['identifier1', 'identifier2']

In additon we should support slicing

sliced_db = db[2:5]