featurebyte.ViewColumn.str.len¶
len( ) -> FrozenSeries
Description¶
Computes length of each string element.
Returns¶
- FrozenSeries
A new Column or Feature object.
Examples¶
Compute the length of each string element in the BrowserUserAgent column:
>>> view = catalog.get_view("GROCERYCUSTOMER")
>>> view["BrowserUserAgentLength"] = view["BrowserUserAgent"].str.len()
>>> view.preview(5).filter(regex="BrowserUserAgent")
BrowserUserAgent BrowserUserAgentLength
0 Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.3... 102
1 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:6... 78
2 Mozilla/5.0 (Windows NT 10.0; Win64; x64) Appl... 115
3 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4... 117
4 Mozilla/5.0 (Windows NT 6.1; Win64; x64) Apple... 113