Generating attributes based on the values of another attribute
I have a nominal attribute and would like to generate an attribute with each value of the initial nominal attribute as a new attribute name. For each occurrence of any given value in the nominal attribute, I would also like to increment the value in the corresponding attribute by 1. Initial approach was to try Loop Values, but Loop Values skips that particular Loop if the attribute has already been created. Any thoughts on a different approach to this problem? Thanks!
Find more posts tagged with
Sort by:
1 - 3 of
31
I am attaching the process on the Titanic dataset which I have done so far. I have generated 3 new attributes based on the values in the Port of Embarkation attribute. The output of this process almost achieves what I want. The only thing is for passengers 'Connolly, Miss. Kate' and 'Kelly, Mr. James', instead of 2 entries in the final result it should only give one entry with corresponding attributes updated.
I am also sure there is a much better way or some operator which elegantly achieves this without going through the lengthy process I have done.
I am also sure there is a much better way or some operator which elegantly achieves this without going through the lengthy process I have done.
I have difficulties to understand what you want to achieve.
Can you give an example of what you initially have AND an example of what you want to get.
Regards,
Lionel