Код: Выделить всё
Data_Frame 1
RMS
0 55.6
1 70.9
2 91
3 36
Код: Выделить всё
Data_Frame 2
RMS
0 60.6 ~ 51.6
1 75.9 ~ 65.9
2 95 ~ 85
3 41 ~ 31
Код: Выделить всё
def find_matches(df_list, tolerance=5):
matches = []
for i, df1 in enumerate(df_list):
for j, df2 in enumerate(df_list):
if i != j:
for rms_value in df1['RMS']:
matched_values = df2[(df2['RMS'] >= rms_value - tolerance) & (df2['RMS']
Подробнее здесь: [url]https://stackoverflow.com/questions/78790266/finding-2-or-more-matches-of-data-frames-according-to-values-of-a-specific-colum[/url]