The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
De-pivot excel file [SOLVED]
I am trying to de-pivot a excel file like below, the "NA" are null values, I have Field3 and field4 set as integers
I have:
attribute name >> edit list >> attribute name = field3 & atrributes = .*
index attribute = myNewFieldName
checked create nominal index
checked keep missings
I keep getting the error:
Thanks
I have:
attribute name >> edit list >> attribute name = field3 & atrributes = .*
index attribute = myNewFieldName
checked create nominal index
checked keep missings
I keep getting the error:
Any help is greatly appreciated
Process failed
"attributes have different value types: no conversion performed"
Thanks
| id field1 field2 field3 field4 |
| 1 stuff aaa 4 3 |
| 2 stuff bbb 7 6 |
| 3 stuff ccc NA 1 |
| 4 stuff ddd 3 3 |
| 5 stuff eee 9 NA |
| 6 stuff fff 6 NA |
Tagged:
0
Answers
-
This depends on what you want to achieve... The problem, however, is that after De-Pivot all attributes that match the regular expression on the right side of "attributes = .*" will be located in the same column and thus must have the same value type. In your case .* matches all attributes, i.e. field1-4, that obviously have different value types. You can use either field1-2 or field3-4, which you can specify in the regular expression e.g. as "filed3|field4". Hope this helps!
Best regards,
Marius0 -
Hello Marius (Nice mutton cop whiskers!), thanks for the response
I need,
id field1 field2 Cnewfeld Col5
1 stuff aaa field3 4
1 stuff aaa field4 3
2 stuff bbb field3 7
2 stuff bbb field4 6
3 stuff ccc field3 NA
3 stuff ccc field4 1
4 stuff ddd field3 3
4 stuff ddd field4 3
5 stuff eee field3 9
5 stuff eee field4 NA
6 stuff fff field3 6
6 stuff fff field4 NA0 -
What does this table mean?0
-
Thank you I did not notice that "filed3|field4" the first filed3 was miss spelled, after correcting it all is working well.0
-
Ups, sorry
Glad that it is working now! 0
Contributor II
Unicorn