You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides an option to pass a template string that's to be used to create a text feature, this template is saved in [metadata](#metadata).
287
+
288
+
```python
289
+
import pyspark.sql.functions as F
290
+
import rialto.maker as rfm
291
+
from pyspark.sql import Column
292
+
from rialto.metadata import ValueType asVT
293
+
294
+
@rfm.feature(VT.numerical)
295
+
@rfm.desc("Age of customer")
296
+
@rfm.template("Customer is $X years old")
297
+
defAGE() -> Column:
298
+
return F.col("AGE")
299
+
```
300
+
285
301
#### @param
286
302
Inspired by @pytest.mark.parametrize, it has similar interface and fulfills the same role. It allows you to invoke the feature function multiple times with different values of the parameter.
287
303
If multiple @params are used, the number of final features will be a product of all parameters. The feature function has to expect a parameter with the same name as the @params name.
0 commit comments