larray.IGroup

class larray.IGroup(key, name=None, axis=None)[source]

Index Group.

Represents a subset of indices of an axis.

Parameters
keykey

Anything usable for indexing. A key should be either a single position, a sequence of positions, or a slice with integer bounds.

namestr, optional

Name of the group.

axisint, str, Axis, optional

Axis for group.

__init__(self, key, name=None, axis=None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, key[, name, axis])

Initialize self.

by(self, length[, step, template])

Split group into several groups of specified length.

containing(self, substring)

Returns a group with all the labels containing the specified substring.

difference(self, other)

Returns (set) difference of this label group and other.

endingwith(self, suffix)

Returns a group with the labels ending with the specified string.

equals(self, other)

Checks if this group is equal to another group.

eval(self)

Translate key to labels, if it is not already, expanding slices in the process.

intersection(self, other)

Returns (set) intersection of this label group and other.

matching(self[, deprecated, pattern, regex])

Returns a group with all the labels matching the specified pattern or regular expression.

named(self, name)

Returns group with a different name.

retarget_to(self, target_axis)

Retarget group to another axis.

set(self)

Creates LSet from this group

startingwith(self, prefix)

Returns a group with the labels starting with the specified string.

to_hdf(self, filepath[, key, axis_key])

Writes group to a HDF file.

to_label(self)

Translate key to labels, if it is not already

translate(self[, bound, stop])

compute position(s) of group

union(self, other)

Returns (set) union of this label group and other.

with_axis(self, axis)

Returns group with a different axis.

Attributes

axis

format_string

key

name