df = pd.DataFrame(np.array([[[1740, 6920, 10120, 14300, 18220, 24500, 41300], 10000, 20000], [[1620, 5840, 12100, 15000, 25260, 26020], 5900, 15200]]),
columns=['long_list', 'min', 'max'])
For this dataframe, I'm hoping to create a new column df['part'] that is the part of df['long_list'] that meets the condition of df['min']<df['part']<df['max']. I tried to use a lambda function but struggled with how to use all three columns. So the output would be
df2=pd.DataFrame(np.array([[[1740, 6920, 10120, 14300, 18220, 24500, 41300], 10000, 20000, [10120, 14300, 18220]], [[1620, 5840, 12100, 15000, 25260, 26020], 5900, 15200,[12100, 15000]]]),
columns=['long_list', 'min', 'max','part'])