I’ve got a csv file and whenever i access the elements it gets me
aapl,2001-12-4,,,,,
The commas at the end is causing my functions to not work properly for my other application. How can I remove this in order to get rid of any additional commas after elements?
for example the above after correction would be
aaple,2001-12-4
anything will help, thanks so much.
m
Here’s how to remove the excess commas from the right hand side of a string:
Expand on this to perform the comma-stripping operation for each line of a file: