May-23-2019, 09:49 AM
So I have some data and I want to find out the index of the minimum. Since the data structure is not a list, I can't just use the
Any idea whats going wrong here?
list.index()command. I came up with the idea to loop through the data and if I find the minimum, I save the position.
i = 0 q = 0 mini = data['open'].min() for x in data['open']: if x == mini: i = q q +=q print("index = ") print(i)When I run the program, I don't get any error but i = 0 what I don't understand since I found a minimum in the dataset with
mini = data['open'].min().
Any idea whats going wrong here?