Data Pipeline Patterns
Transform Values
Mapping transforms each input value into the shape needed by later pipeline stages.
Transform Values
transform_values.py
prices = [10, 25, 40]
discount =
net_prices = []
for price in prices:
net_prices.append(price - discount)
print("net=" + ",".join(str(price) for price in net_prices))
prices = [10, 25, 40]
discount =
net_prices = []
for price in prices:
net_prices.append(price - discount)
print("net=" + ",".join(str(price) for price in net_prices))
transforming values
A transform stage computes a new value for each item without changing the original list.