get_common_samples
improvelib.utils.get_common_samples(df1, df2, ref_col)
Search for common data in a reference column and retain only those rows.
Provided as a helper function.
Parameters:
- df1pd.DataFrame
First DataFrame.
- df2pd.DataFrame
Second DataFrame.
- ref_colstr
The reference column to find the common values.
Returns:
- df1, df2Tuple of pd.DataFrames
DataFrames after filtering for common data.
Example