Skip to main content
Solved

Clean up csv data


I have a csv separated by semicolon. Some lines have too many semicolons (bad data). To clean up the data I have read the csv with a Text File Reader to read line-by-line and used an AttributeCreator to create an attribute for the number of semicolons in each line. Then I followed that up with a Tester to retrieve the lines with the correct number of semicolons (clean data). Now I have this text line data and need to write back to a csv. I cannot figure out how to write to a csv from the text line data.

Best answer by erik_jan

You can use the Text writer and append to the existing CSV file or write to a new file (using the filename <my_filename>.csv).

View original
Did this help you find an answer to your question?

2 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • Best Answer
  • June 1, 2018

You can use the Text writer and append to the existing CSV file or write to a new file (using the filename <my_filename>.csv).


  • Author
  • June 1, 2018

thanks, I eventually came to the same conclusion and it works.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings