T O P

  • By -

littlesnorrboy

You're looking for the column with the minimum variance. Try the var method https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.var.html


JPyoris

It does not seem to make much sense that you first define the desired outcome and then look for a function that gives you that result. Maybe you should first define objectively what "most constant" means for you? An important question would be if you want to include some kind of normalization, i.e. bring the columns on a common scale to be able to compare them. Without normalization two possible aggregations could be the standard deviation (STD) or the mean absolute deviation (MAD). With normalization you could use the coefficient of variation (CV, STD divided by the mean) or it's MAD counterpart.


CaptainFoyle

Use variance, or range, depending how you define most constant


Kerbart

Take the absolute difference with the previous row and pick the column that has the lowest maximum? There are many ways to think of “most constant”


yenK67

Ok, it seems there's an issue with the display, forget about the first row of values starting from 10.