I have a dataframe: temp_df
line sheet comments
1 apple this is a fruit
2 orange this is fruit
[1,3] onion this is a vegetable
I want to sort this temp_df dataframe based on sheet and line but since line has mix of integer and list. I will take the first index if the column value is a list. so the sorted temp_df looks like:
line sheet comments
1 apple this is a fruit
[1,3] onion this is a vegetable
2 orange this is fruit