'Can we add row to sorted dataframe at correct position

can we take this sorted dataframe and add specific information for each duplicate sort value like Mukesh ChanderSeth for sort on investor name before its data displaying in the next row. for each duplicate investor..?

DATAFRAME we have

            investor      folio_no      units  market_value    stp_amount 
1  Mukesh ChanderSeth    1234567890  26.616000        351.32  10000.000000 
2  Mukesh ChanderSeth    1234567890  26.465000        351.32  10000.000000 
3  Mukesh ChanderSeth    1234567890  26.616000        351.32  10000.000000 
4  Narand Jagmohandas    1234567890  26.465000        351.32  10000.000000 
5  Narand Jagmohandas    1234567890  26.616000        351.32  10000.000000 
6  Narand Jagmohandas    1234567890  26.465000        351.32  10000.000000 

o/p expected

            investor      folio_no      units  market_value    stp_amount 
Mukesh ChanderSeth Details
1  Mukesh ChanderSeth    1234567890  26.616000        351.32  10000.000000 
2  Mukesh ChanderSeth    1234567890  26.465000        351.32  10000.000000 
3  Mukesh ChanderSeth    1234567890  26.616000        351.32  10000.000000 
Narand Jagmohandas Details
4  Narand Jagmohandas    1234567890  26.465000        351.32  10000.000000 
5  Narand Jagmohandas    1234567890  26.616000        351.32  10000.000000 
6  Narand Jagmohandas    1234567890  26.465000        351.32  10000.000000 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source