My datas :
I want to have the point(LogRatio,Strength) that is the median position
of my group indexA-indexB
indexA = 0
indexB = 4
point_logRatio = df['LogRatio'][indexA:indexB].median()
point_Strength = df[df['LogRatio']==point_logRatio['Strength'].iloc
But I don't want to calcul the median with values
, I just want the index of the row to get the LogRatio and the strength corresponding. Because point_logRatio
calcul the median and don't give me just the row.
That's why my point_Strength
doesn't work because the median calculated don't match with a value of the dataframe.
So, if you have an easier way to get the LogRatio and the Strength at the same time where LogRatio is at a median position
in my dataframe between indexA and indexB, thank you.
At the end, I would like to have :
point = (0.533 , 9.7)
Because 0.533 is the logRatio at the median position between my index 0 and 4 in my dataframe and the strength corresponding is 9.7.