I have a lab with 2 dataframes as below:
df1 = df1.head(10)
HT D
0 A BL
1 B 0
2 C NaN
3 D 7
4 E 3
5 F NaN
6 G 2
rng.head(10)
Range Group
0 0 group A
1 3 Group B
2 5 Group C
3 8 Group D
4 11 Group E
how I can find approximate value from column df['D'] in column rng['Range'] , sth like vlookup approximate in Excel. My output expected as below:
HT D Group
0 A BL
1 B 0 GroupA
2 C NaN
3 D 7 GroupC
4 E 3 GroupB
5 F NaN
6 G 2 GroupA