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

[Solved]Append different datasets

aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
edited November 2018 in Help
Hi everybody ,

Let's assume that I have two datasets , S1 (which the features are a_1,a_2,a_3) and S2 which the features are (a_1,a_2,a_3,a_4)

a_1 , a_2 , a_3 are of similar types and roles , but the only difference is that S2 has one more attribute a_4 ,

how can I append these two datasets into 1 dataset (with a_1,a_2,a_3,a_4) having missing values of a_4 attribute for instances of S1  ?

(is there a way to ADD an attribute to a dataset with missing values ?)

Thanks ,
Arian

Answers

  • [Deleted User][Deleted User] Posts: 0 Newbie
    Hi Arian,

    the simplest way is to use the "Union" operator instead of "Append".
    The resulting ExampleSet contains all attributes of both original ExampleSets and not existing values are set to missing.

    Adding an attribute witih missing values to an ExampleSet can be achieved with the operator "Generate Empty Attribute" where you specify the name and the value type of the new attribute. All values will be missing.

    Best,
    Edin
  • aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
    Thanks a lot ,

    Arian
Sign In or Register to comment.