Features.unique¶
- Features.unique()¶
Only the unique features from this object.
Any repeated features will be removed from the returned object. If feature names are present, the feature name of the first instance of the unique feature in this object will be assigned.
- Returns:
nimble Base object – The object containing only unique features.
Examples
>>> lst = [['a', 1, 3, 'a'], ... ['a', 5, 6, 'a'], ... ['b', 7, 1, 'b'], ... ['c', 2, 9, 'c']] >>> ftNames = ['f1', 'f2', 'f3', 'f1_copy'] >>> X = nimble.data(lst, featureNames=ftNames) >>> uniqueFeatures = X.features.unique() >>> uniqueFeatures <DataFrame 4pt x 3ft f1 f2 f3 ┌─────────── 0 │ a 1 3 1 │ a 5 6 2 │ b 7 1 3 │ c 2 9 >
Keywords: distinct, different