How to compare common variables of two files?

kimjk3559
kimjk3559 Altair Community Member
edited November 5 in Community Q&A
I have two csv files, a and b.

These two csv have a common variable 'c', and the other variables have different types and numbers.

'After creating a new variable aa in file a, if the value of variable c in both files is the same, fill aa with 0, otherwise fill with 1'

Can we make a conditional statement like this?

Creating a new variable is not difficult, but creating a condition to compare the values of two files is difficult.

Any help please?

thank you
Tagged:

Best Answer

  • BalazsBarany
    BalazsBarany New Altair Community Member
    Answer ✓
    Hi!

    Connecting two datasets based on a common attribute is called "Join". There is an operator for it in RapidMiner.

    Depending on the requirements, you would use inner join (keeps only matching rows from both tables), left join (keeps all rows from the left table and matching rows from the right table), right or full outer join (keeps all rows, joins the matching ones).

    Regards,
    Balázs

Answers

  • BalazsBarany
    BalazsBarany New Altair Community Member
    Answer ✓
    Hi!

    Connecting two datasets based on a common attribute is called "Join". There is an operator for it in RapidMiner.

    Depending on the requirements, you would use inner join (keeps only matching rows from both tables), left join (keeps all rows from the left table and matching rows from the right table), right or full outer join (keeps all rows, joins the matching ones).

    Regards,
    Balázs

  • kimjk3559
    kimjk3559 Altair Community Member
    tks BalazsBarany!