Skip to content

featurebyte.Target.sqrt

sqrt( ) -> FrozenSeriesT

Description

Computes the square root of each element.

Returns

  • FrozenSeriesT
    Column or Feature with square root values

Examples

Compute square root values for a Column in a View:

>>> view = catalog.get_view("GROCERYINVOICE")
>>> view["AmountSqrt"] = view["Amount"].sqrt()
>>> view.preview(5).filter(regex="Amount")
   Amount  AmountSqrt
0   10.68    3.268027
1   38.04    6.167658
2    1.99    1.410674
3   37.21    6.100000
4    1.20    1.095445

Compute square root values for a Feature:

>>> feature = catalog.get_feature("InvoiceCount_60days")
>>> feature_sqrt = feature.sqrt()