I have data frame like -
ID Min_Value Max_Value
1 0 0.10562
2 0.10563 0.50641
3 0.50642 1.0
I have another data frame that contains Value
as a column. I want to create a new column in second data frame which returns ID
when Value
is between Min_Value
and Max_Value
for a given ID
as above data frame. I can use if-else
conditions but number of ID's are large and code becomes too bulky. Is there a efficient way to do this?