Component¶
-
class
glue.core.component.
Component
(data, units=None)[source]¶ Bases:
object
Stores the actual, numerical information for a particular quantity
Data objects hold one or more components, accessed via ComponentIDs. All Components in a data set must have the same shape and number of dimensions
Notes
Instead of instantiating Components directly, consider using
Component.autotyped()
, which chooses a subclass most appropriate for the data type.- Parameters
data (
numpy.ndarray
) – The data to storeunits (str) – Optional unit label
Attributes Summary
Whether or not the datatype is categorical
The underlying
numpy.ndarray
Whether or not or not the datatype is a date/time
The number of dimensions
Whether or not the datatype is numeric
Tuple of array dimensions
Methods Summary
autotyped
(data[, units])Automatically choose between Component and CategoricalComponent, based on the input data type.
jitter
(self[, method])to_series
(self, \*\*kwargs)Convert into a pandas.Series object.
Attributes Documentation
-
data
[source]¶ The underlying
numpy.ndarray
Methods Documentation