Class DataFrameJoiner

java.lang.Object
tech.tablesaw.joining.DataFrameJoiner

public class DataFrameJoiner extends Object
Implements joins between two or more Tables
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataFrameJoiner(Table table, String... joinColumnNames)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    fullOuter(boolean allowDuplicateColumnNames, Table... tables)
    Full outer join to the given tables assuming that they have a column of the name we're joining on
    fullOuter(Table... tables)
    Full outer join to the given tables assuming that they have a column of the name we're joining on
    fullOuter(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    fullOuter(Table table2, String col2Name)
    Full outer join the joiner to the table2, using the given column for the second table and returns the resulting table
    inner(boolean allowDuplicateColumnNames, Table... tables)
    Joins to the given tables assuming that they have a column of the name we're joining on
    inner(Table... tables)
    Joins to the given tables assuming that they have a column of the name we're joining on
    inner(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    inner(Table table2, boolean allowDuplicateColumnNames, String... col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    inner(Table table2, String col2Name)
    Joins the joiner to the table2, using the given column for the second table and returns the resulting table
    inner(Table table2, String[] col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    inner(Table table2, String col2Name, boolean allowDuplicateColumnNames)
    Joins the joiner to the table2, using the given column for the second table and returns the resulting table
    leftOuter(boolean allowDuplicateColumnNames, Table... tables)
    Joins to the given tables assuming that they have a column of the name we're joining on
    leftOuter(Table... tables)
    Joins to the given tables assuming that they have a column of the name we're joining on
    leftOuter(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    leftOuter(Table table2, boolean allowDuplicateColumnNames, String... col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    leftOuter(Table table2, String col2Name)
    Joins the joiner to the table2, using the given column for the second table and returns the resulting table
    leftOuter(Table table2, String[] col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    rightOuter(boolean allowDuplicateColumnNames, Table... tables)
    Joins to the given tables assuming that they have a column of the name we're joining on
    rightOuter(Table... tables)
    Joins to the given tables assuming that they have a column of the name we're joining on
    rightOuter(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    rightOuter(Table table2, boolean allowDuplicateColumnNames, String... col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
    rightOuter(Table table2, String col2Name)
    Joins the joiner to the table2, using the given column for the second table and returns the resulting table
    rightOuter(Table table2, String[] col2Names)
    Joins the joiner to the table2, using the given columns for the second table and returns the resulting table

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataFrameJoiner

      public DataFrameJoiner(Table table, String... joinColumnNames)
      Constructor.
      Parameters:
      table - The table to join on.
      joinColumnNames - The join column names to join on.
  • Method Details

    • inner

      public Table inner(Table... tables)
      Joins to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      tables - The tables to join with
    • inner

      public Table inner(boolean allowDuplicateColumnNames, Table... tables)
      Joins to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed*
      tables - The tables to join with
    • inner

      public Table inner(Table table2, String col2Name)
      Joins the joiner to the table2, using the given column for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Name - The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • inner

      public Table inner(Table table2, String[] col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • inner

      public Table inner(Table table2, String col2Name, boolean allowDuplicateColumnNames)
      Joins the joiner to the table2, using the given column for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Name - The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers.
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed*
      Returns:
      The resulting table
    • inner

      public Table inner(Table table2, boolean allowDuplicateColumnNames, String... col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed*
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • inner

      public Table inner(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed*
      keepAllJoinKeyColumns - if false the join will only keep join key columns in table1 if true the join will return all join key columns in both table, which may have difference when there are null values
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • fullOuter

      public Table fullOuter(Table... tables)
      Full outer join to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      tables - The tables to join with
      Returns:
      The resulting table
    • fullOuter

      public Table fullOuter(boolean allowDuplicateColumnNames, Table... tables)
      Full outer join to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed*
      tables - The tables to join with
      Returns:
      The resulting table
    • fullOuter

      public Table fullOuter(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed
      keepAllJoinKeyColumns - if false the join will only keep join key columns in table1 if true the join will return all join key columns in both table, which may have difference when there are null values
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • fullOuter

      public Table fullOuter(Table table2, String col2Name)
      Full outer join the joiner to the table2, using the given column for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Name - The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • leftOuter

      public Table leftOuter(Table... tables)
      Joins to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      tables - The tables to join with
      Returns:
      The resulting table
    • leftOuter

      public Table leftOuter(boolean allowDuplicateColumnNames, Table... tables)
      Joins to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed*
      tables - The tables to join with
      Returns:
      The resulting table
    • leftOuter

      public Table leftOuter(Table table2, String[] col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • leftOuter

      public Table leftOuter(Table table2, String col2Name)
      Joins the joiner to the table2, using the given column for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Name - The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • leftOuter

      public Table leftOuter(Table table2, boolean allowDuplicateColumnNames, String... col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • leftOuter

      public Table leftOuter(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed
      keepAllJoinKeyColumns - if false the join will only keep join key columns in table1 if true the join will return all join key columns in both table, which may have difference when there are null values
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • rightOuter

      public Table rightOuter(Table... tables)
      Joins to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      tables - The tables to join with
      Returns:
      The resulting table
    • rightOuter

      public Table rightOuter(boolean allowDuplicateColumnNames, Table... tables)
      Joins to the given tables assuming that they have a column of the name we're joining on
      Parameters:
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed
      tables - The tables to join with
      Returns:
      The resulting table
    • rightOuter

      public Table rightOuter(Table table2, String col2Name)
      Joins the joiner to the table2, using the given column for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Name - The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • rightOuter

      public Table rightOuter(Table table2, String[] col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • rightOuter

      public Table rightOuter(Table table2, boolean allowDuplicateColumnNames, String... col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table
    • rightOuter

      public Table rightOuter(Table table2, boolean allowDuplicateColumnNames, boolean keepAllJoinKeyColumns, String... col2Names)
      Joins the joiner to the table2, using the given columns for the second table and returns the resulting table
      Parameters:
      table2 - The table to join with
      allowDuplicateColumnNames - if false the join will fail if any columns other than the join column have the same name if true the join will succeed and duplicate columns are renamed
      keepAllJoinKeyColumns - if false the join will only keep join key columns in table1 if true the join will return all join key columns in both table, which may have difference when there are null values
      col2Names - The columns to join on. If a name refers to a double column, the join is performed after rounding to integers.
      Returns:
      The resulting table