Skip to content

featurebyte.Target.abs

abs( ) -> FrozenSeriesT

Description

Computes the absolute numeric value of each element.

Returns

  • FrozenSeriesT
    Column or Feature with absolute values

Examples

Compute absolute values for a Column in a View:

>>> view = catalog.get_view("GROCERYCUSTOMER")
>>> view["LongitudeAbs"] = view["Longitude"].abs()
>>> view.preview(5).filter(regex="Longitude")
   Longitude  LongitudeAbs
0   5.209627      5.209627
1   7.423195      7.423195
2   2.990572      2.990572
3 -61.069866     61.069866
4   3.120654      3.120654
Compute absolute values for a Feature:

>>> feature = catalog.get_feature("InvoiceCount_60days")
>>> feature_abs = feature.abs()