I am coming from the following Excel table:
I want to create a binary indicator indicating cases where the departure airport is not equal the previous arrival airport - basically reconstructing what I did in Excel (Note: "WENN" is equal to "IF" in English). The dataframe is sorted accordingly. What is the best way to do this with python? Is there a way to solve it with pandas?
And lastly, is there a better and more concise technical formulation to ask this question?
Thanks already!