I need to find rows that have circular referenced in the CSV input file like:
start,end,weather
california,arizona,hot
colorado,kansas,cold
arizona,california,hot
The above should detect that the 1st and 3rd row a circular reference. I'm currently loading the csv into database and running a self-join query to determine that the data has circular reference. But looking to see if there is any way to handle this using Python Pandas.
Thanks!
california -> arizona,arizona -> kansas,kansas -> california? Do you need to handle this loop?right/leftmatter? What if the last row hasrightrelation?