May-20-2019, 06:33 PM
(May-20-2019, 05:28 PM)michalmonday Wrote: Now I'm even more confused to be honest.
So
X = [5,5,5,5,5]
results in:
Y = [1,1,1,1,1]
but
X = [4,4,4,4,4]
results in
Y = [3,3,3,3,3]
Another thing that is confusing me is that:
X = [1,2,3]
results in
Y = [1,2,3]
but
X = [6,6,6]
results in
Y = [4,6,7]
And in the first example it used to be:
X = [3,4,5]
resulting in
Y = [0,0,0]
What's the logic behind it?
i suggest to stick the latest sample data that I showed. basically i am observing data from a machine which will spit out numbers in X and when these numbers repeat themselves, it means something is wrong and it will then spit out the failure information in Y so that is why I need to know what is Y when X has repeated occurrences because the failure description is tied to the number being shown in Y. The reason why I need the information only once is because the failure in Y can also repeat itself at a later timepoint so even if I used the groupby method for Y, it will not separate these occurrences, for example Y may have [5,5,5,5,5,1,2,3,5,5,5,5,5,0,1,3,3,3,3,3] so I need to know that failure 5 occurred twice in this time series and not the sum of it. I hope this is clear and thanks for your patience.