Pandas dataframe don't support recursive query by default. But this video will teach you, how to do SQL recursive query in python dataframe.
Output generated is of bread crumb.
This can also be said as parent child hierarchical query.
This can be said as SQL CTE, alternative.