What should be the optimized pandas command to create a new data frame from existing data frame that have only 1 column named val with the following transformation.
Input:
1_2_3
1_2_3_4
1_2_3_4_5
Output:
2
2_3
2_3_4
Remove everything till first underscore (including _) and also remove everything after last _ (including _)