I have the following dataframe:
route1 route2
1 19.0 51.0
2 47.0 46.0
3 56.0 37.0
4 43.0 2.0
I would like to have the following output.
edge route
1 19.0 route1
2 47.0 route1
3 56.0 route1
4 43.0 route1
5 51.0 route2
6 46.0 route2
7 37.0 route2
8 2.0 route2
How can I do that? I checked that Pandas: Multiple columns into one column but it doesnt help that much with the new column routes
that I want to create.
Thank you in advance!