A very nice code indentation tool for Python is called Black
pip install black
It is able, differently from other code indentation tools, to correctly separate those very long method chains typically present in Pandas.
Further reading
Read more in the tech topic.