Combining 2 CSV files connected by a reference #

My scenario parses 2 separate CSV files that share a reference number. I’m trying to connect the data into one combined CSV file, connected by that reference number. CSV file # 1 is the smaller data set. CSV file# 2 is the larger data set. I don’t want the reference numbers in CSV file# 2 that do not occur in CSV file #1.