h5rdmtoolbox.wrapper.core.Group
h5rdmtoolbox.wrapper.core.Group#
- class h5rdmtoolbox.wrapper.core.Group(_id)[source]#
Inherited Group of the package h5py. Adds some useful methods on top of the underlying h5py package.
Note
All features from h5py packages are preserved.
Notes
The following methods are added: * get_datasets() - returns a list of datasets in the group * get_groups() - returns a list of groups in the group * get_tree_structure() - returns a tree structure of the group * create_string_dataset() - creates a dataset with string datatype * create_time_dataset() - creates a dataset with time datatype
The following properties are added (or overwritten): * attrs - returns the h5tbx attribute manager, which is a subclass of the h5py attribute manager * rdf - returns the RDF Manager * rootparent - returns the root group instance * basename - returns the basename of the group
Methods
__init__(_id)Create a new Group object by binding to a low-level GroupID.
build_virtual_dataset(name, shape, dtype[, ...])Assemble a virtual dataset in this group.
clear()copy(source, dest[, name, shallow, ...])Copy an object or group.
create_dataset(name[, shape, dtype, data, ...])Creating a dataset.
create_dataset_from_csv(csv_filename, *args, ...)Create datasets from a single csv file.
create_dataset_from_image(img_data, name[, ...])Creates a dataset for a single or multiple files.
create_dataset_from_xarray_dataset(dataset)creates the xr.DataArrays of the passed xr.Dataset, writes all attributes and handles the dimension scales.
create_dataset_like(name, other, **kwupdate)Create a dataset similar to other.
create_datasets_from_csv(csv_filenames[, ...])Reads data from a csv and adds a dataset according to column names.
create_external_link(name, filename, path[, ...])Creates a group which points to group in another file.
create_from_dict(dictionary)Create groups and datasets based on a dictionary
create_from_jsonld(data[, context])Create groups/datasets from a jsonld string.
create_from_yaml(yaml_filename[, num_dtype])creates groups, datasets and attributes defined in a yaml file.
create_group(name[, overwrite, attrs, ...])Overwrites parent methods.
create_string_dataset(name, data[, ...])Create a string dataset.
create_time_dataset(name, data, time_format)Special creation function to create a time vector.
create_virtual_dataset(name, layout[, fillvalue])Create a new virtual dataset in this group.
dump([collapsed, max_attr_length, chunks, ...])Outputs xarray-inspired _html representation of the file content if a notebook environment is used
dumps([hide_uri])string representation of group
find(flt[, objfilter, recursive, ...])Examples for filter parameters: filter = {'long_name': 'any objects long name'} --> searches in attributes only filter = {'$name': '/name'} --> searches in groups and datasets for the (path)name filter = {'$basename': 'name'} --> searches in groups and datasets for the basename (without path)
find_one(flt[, objfilter, recursive, ...])See ObjDB.find_one()
get(name[, default, getclass, getlink])Retrieve an item or other information.
get_dataset_names([recursive])Return all dataset names in this group and if recursive==True also all below
get_datasets([pattern, recursive])Return list of datasets in the current group.
get_group_names([recursive])Return all group names in this group and if recursive==True also all below
get_groups([pattern, recursive])Return list of groups in the current group.
get_tree_structure([recursive, ignore_attrs])Return the tree (attributes, names, shapes) of the group and subgroups
items()Get a view object on member items
keys()Get a view object on member names
move(source, dest)Move a link to a new location in the file.
pop(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem()as a 2-tuple; but raise KeyError if D is empty.
require_dataset(name, shape, dtype[, exact])Open a dataset, creating it if it doesn't exist.
require_group(name)Return a group, creating it if it doesn't exist.
sdump([hide_uri])string representation of group
setdefault(k[,d])update([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values()Get a view object on member objects
visit(func)Recursively visit all names in this group and subgroups.
visit_links(func)Recursively visit all names in this group and subgroups.
visititems(func)Recursively visit names and objects in this group.
visititems_links(func)Recursively visit links in this group.
Attributes
attrsCalls the wrapper attribute manager
basenameBasename of dataset (path without leading forward slash)
conventionReturn the convention currently enabled.
fileReturn a File instance associated with this object
frdfVia the File RDF Manager, semantic properties can be associated with the file rather than the root group.
hdf_filenameThe filename of the file, even if the HDF5 file is closed.
hdfrepridLow-level identifier appropriate for this object
iriDeprecated.
nameReturn the full name of this object.
parentReturn the parent group of this object.
rdfReturn RDF Manager
refAn (opaque) HDF5 reference to this object
regionrefCreate a region reference (Datasets only).
rootgroupReturn the root group instance.
rootparentReturn the root group instance.
standard_attributesReturn the standard attributes of the class.