Dfs Algorithm In Python Using Pandas In Jupyter