in my df i want to add row when its meets specific condition,df has thousands of rows.In id column when a new value of id is started i want to add new row copying same id value. df is as as below
id name value
0000 length 46
0000 status completed
0000 segment 21
1111 tp 0.1
1111 x 56
2222 point 23.01
2222 x 50
2222 y 40
id name value
0000 type description #new row
0000 length 46
0000 status completed
0000 segment 21
1111 type description #new row
1111 tp 0.1
1111 x 56
2222 type description #new row
2222 point 23.01
2222 x 50
2222 y 40