I have a dataframe:
id1 vals1 id2 vals2
a1 [5,6] b1 [8]
c1 [5,3] e1 [4,5,6]
I want to calculate mean values of vals1 and vals2 and filter my dataframe if absolute value of difference between those mean values is higher than 1, to remove that row. How to do that?
So desired result is:
id1 vals1 id2 vals2
c1 [5,3] e1 [4,5,6]