I have two dataframes df1 and df2. I want to add a column "Layer" from dataframe df2 to my main dataframe df1 based on the depth intervals. Both dataframes have different shape. Could you please help me to understand how can I do in a most efficient way in pandas? Df3 is what is desired. I grouped first on index and then tried to wright a code, but cannot understand the logic which I should follow.
Df1:
Df2:
Df3: