Hi,
Bit of on odd one i cannot work out. I have some tabular data e.g.
203040325The headers are 20,30,40 with values 3,2,5.
Is there a simple oway to end up with
20304020,20,2030,3040,40,40,40,40Thanks
Hi,
Bit of on odd one i cannot work out. I have some tabular data e.g.
203040325The headers are 20,30,40 with values 3,2,5.
Is there a simple oway to end up with
20304020,20,2030,3040,40,40,40,40Thanks
Best answer by david_r
Try the following in a PythonCaller:
import fmeobjects
def multiply(feature):
attr_names = feature.getAllAttributeNames()
for attr in attr_names:
if attr.isdigit():
value = int(feature.getAttribute(attr))
result = ','.join([attr] * value)
feature.setAttribute(attr, result)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.