map()
Was this page helpful?
Applies a lambda function to each value in each MTS in the stream.
Syntax
map(lambda)
Parameter definitions
Parameter | Type | Description |
---|---|---|
lambda | lambda function | Lambda function to apply to each value in each MTS in the input stream |
Returns a stream.
Examples
#Apply a lambda function to a stream data('cpu.utilization').map(lambda x: x / 2).mean().sum(over='1h') #Same thing without lambda utilization = data('cpu.utilization') (utilization/2).mean().sum(over='1h')\n