Question:
I’d like have a loop that iterates over both the index, and the entries in one specific column of a dataframe. I’ve found a solution that works, but I feel there should be something more elegant. Any suggestions?Working example:
Answer:
The dataframe entry has a dictionary interface for this purpose. You can dodf['A'].items()
If you have better answer, please add a comment about this, thank you!