MatchTools

This submodule contains a function used in the match.py submodule to match two DataFrames by comparing values from columns for each (see match.py).

Functions

match_dataframes(main_DF, second_DF, ...)

Matches data from two DataFrames by following a passed MatchConfig

chromaquant.match.match_tools.match_dataframes(main_DF: DataFrame, second_DF: DataFrame, match_config: MatchConfig) DataFrame

Matches data from two DataFrames by following a passed MatchConfig

Parameters

main_DFDataFrame

A DataFrame with data to be matched, will serve as basis for returned results

second_DFDataFrame

Another DataFrame with data to be matched

match_configMatchConfig

A MatchConfig with parameters for matching, including information about columns to match by and columns to include in results

Returns

DataFrame

A DataFrame containing data from main_DF plus some added data from second_DF as defined in match_config

Raises

ValueError

If a DataFrame slice created from matching is of unexpected length, specifically a negative value.