Skip to main content
Solved

Clean up csv data

  • June 1, 2018
  • 2 replies
  • 56 views

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).

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • 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.