Have Python output .csv with space-padded, fixed width, but comma-separated columns?

Let’s say I have CSV data as note below; let’s call this original.csv: name,value1,value2 firstname,34326408129478932874,553 secondname_a_very_long_one,65,123987 thirdname_medium,9686509933423,33 Basically, it’s either single word text (no space separation, so no need for quoting) or numbers (here integers, but could be floats with decimals or scientific 1e-5 notation) – and there is no expectation that a comma could… Read More Have Python output .csv with space-padded, fixed width, but comma-separated columns?

best way to break up fixed width files in R

Below is the sample data. string1 <- c(320100000020220311020210) string2 <- c(320100000020220312120211) testitem <- data.frame (string1,string2) My first question is what is the best method to break up the strings in a specified fashion. For example, the breaks should appear after characters 2,4,10,14,16,18,19, and 23. In this case, the end result should appear as such 32… Read More best way to break up fixed width files in R