I have a 5-column CSV file. How to use Python, how to remove the last column (header5 in the example)? Is there a simple way that I am missing, or do I need to iterate over all the lines in the CSV and remove each value from the last column (which may leave me with an undesirable preceding comma)?
I do not see anything related to this in the CSV module or elsewhere in interwebs, so any help is greatly appreciated.
header1,header2,header3,header4,header5 value1,value2,value3,value4,value5 value1,value2,value3,value4,value5
source share