i have a Dataframe like this
Names; Count; PartNr
R1, R2,...Rn; n; 1234-5678
C1, C2; 2; 1234-6789
The list should be exported to a csv file for importing in another proprietary software. The software accepts up to 100 chars in the "Names" column, if there's more data, i should wrap the existing row, copy the whole column and add the remaining names. So there should be multiple rows with a maximum of 100 characters in the Names column. The absolute count of the parts should be only in the first row, so the Count value should be set to zero.
Names; Count; PartNr
R1, R2,...Ra; n; 1234-5678
Ra+1, Ra+2,...Rb; 0; 1234-5678
Rb+1, Rb+2,...Rn; 0; 1234-5678
C1, C2; 2; 1234-6789
Is there a nice way, to modify this directly in pandas?
I tried to iterate through the rows, but i am not allowed to modify the dataframe i'm iterating through, so this didn't work. Any better solutions?
The Dataframes are from 10 to 1000 times long and only a few rows have too long Names, so performance isn't really important.