this_genes = this_genes.loc[~(this_genes['chr_start'] >= max_bp) & ~(
    this_genes['chr_stop'] <= min_bp)]
for line in this_genes.iterrows():
    info = line[1]
this_snp = this_chr_snp.loc[(this_chr_snp['BP'] >= info['chr_start']) & (
    this_chr_snp['BP'] <= info['chr_stop'])]
if this_snp.shape[0] != 0:
    this_snp = this_snp[['SNP']]
this_snp.insert(1, 'feature_id', info['feature_id'])
all_dfs.append(this_snp)
all_genic_snps = pd.concat(all_dfs)
Слияние DataFrames по нескольким условиям, а не по равным значениям