I have 10 dataframes,df1...df10 with 2 columns:
df1
id | 2011_result,
df2
id | 2012_result,
...
...
df3
id| 2018_result
I want to do select some ids with 2011_result values less than a threshold.
sample_ids=df1['2011_result']<threshold].sample(10)['id'].values
After this, I need to select the values for other columns from all other data frames for the list.
Something like this:
df2[df2['id'].isin(sample_ids)]['2012_result']
df3[df3['id'].isin(sample_ids)]['2013_result']
Could you please help out?