Compare Data

Description

You should use this brick when there is a need to create an additional column. There are several options available on how a new column is going to be created.

Use

You should select one setting from the drop-down brick menu.
As a result of the comparison, an additional column with True/False values would be added to the output dataset. Depending on the selected option column and value or columns, the operator, and a new column name should be specified. The following options are available:

Compare column against a value

Mandatory inputs:
  1. Column
  1. Value
  1. New column name
  1. One operator from the following:
      • >, >=, <, <=, ==, != works only with numeric data types
        • Example: check if Age(data1) bigger than 25
      notion image
      • starts with works only with string data type
        • Example: check if Name(data1) starts with "Braund"
          notion image
           
      • ends with works only with string data type
        • Example: check if Name(data1) ends with "Harris"
          notion image
      • contains works only with string data type
        • Example: check if Name(data1) contains "Mr."
          notion image
      • is contained in works only with string data type
        • Example: check if Name(data1) is contained in "Braund, Mr. Owen Harris Passenger"
          notion image
           

Compare column against another column from the same dataset

Mandatory inputs:
  1. Column
  1. Column to compare with
  1. New column name
  1. One operator from the following:
      • >, >=, <, <=, ==, != works only with numeric data types
        • Example: check if Age(data1) is bigger than Pclass(data1)
          notion image
      • starts with, ends with works only with string data type
        • Example: check if Sex(data1) ends with Columns(data1)
          notion image
      • is contained in works only with string data type
        • Example: check if Column(data1) is contained in Name(data1)
          notion image
      • contains works only with string data type
        • Example: check if Name(data1) contains Column(data1)
          notion image
 

Compare column against another column from a different dataset

Mandatory inputs:
  1. Column from first input dataset
  1. Column to compare with from optional dataset
  1. New column name
  1. One operator from the following:
      • >, >=, <, <=, == works only with numeric data types, optional dataset, in this case, should have one row only
        • Example: check if Pclass(data1) bigger that value in Classes(data2)
          notion image
          notion image
           
      • != works only with numeric data types, check if the value in Pclass(data1) is not presented in all values from Classes(data2)
        • notion image
          Example:
      • starts with, end with works only with string data types, optional dataset, in this case, should have one row only
        • Example: check if Name(data1) starts with value from Passenger(data2)
          notion image
          notion image
      • contains works only with string data types
        • Example: check if Name(data1) contains values from Passenger(Data2)
          notion image
          notion image
           
      • is contained in works only with string data types
        • Example: check if Name(data1) is in values of Passengers(data2)
          notion image
          notion image
       
undefined