At this stage, I would recommend trying to debug the error yourself since you should have enough python experience by now. So, try to answer a few questions:
Where does the error originate? The error message usually points to that.
Given where it originates, what list might the error message refer to?
What does the error message imply? It’s talking about list, indices, integers, Series. Given all of those and the possible line of code that caused the error, what can you infer from the message? What do you think is happening?
Lastly, have you tried to google the error (with or without additional keywords you might think are relevant to your code)? What kind of results do you get? How do they relate to your current understanding given the above questions?
Try to answer the above questions and debug it yourself first. Feel free to ask more questions after that.
For what I can tell the error is being originated in my function…
Hhhmmm, it might be referring to the ls list?
My function is made to return a set of winning numbers upon a specific index/row number. But I have to do a more generic function, so that it can capture all the meaningfull rows, once used with the apply.
I did, and the closest to what I found whas this in stack: