🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to encode all apostrophes when exporting CSV file

User: "EL75"
New Altair Community Member
Updated by Jocelyn
Hi rapid miner community,
at the end of the process, I use write CSV operator.
When looking at the result, apostrophes are missing: Do you know how to encode apostrophe "' ' " in rapid miner ? 
best regards

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "kayman"
    New Altair Community Member
    encoding typically means adding a backslash in front of it, so like \'
    Now, these should not disappear in the first place I think, so you might also try to tweak the settings of your export (like untick 'quote nominal values') as this may interfere with your content also
    User: "EL75"
    New Altair Community Member
    OP
    Hi, Kayman,
    could you tell me where I could do this ? I use the "replace" operator, and I tried different ways using \' but that doesn't work.
    I also untick the 'quote nominal values' without more success.

    By the way, I'm getting mad searching a way of exporting results (CSV file that is the output of the process "write CSV") in a folder on my computer in order to open it with excel. The operator write and store the file in my rapid miner repository...
    thanks again for your help, hope you'll save me from there..
    User: "kayman"
    New Altair Community Member
    Accepted Answer
    In order to add an escape character you'll need to use the replace operator. So before you send your data to the export CSV operator add a replace operator and replace ' with \'

    Now, it's a really weird problem, as Rapidminer kind of deals with this out of the box already, and I've never had any issues with this. Also writing a file to the desired folder has never been an issue either, just adding the full path (like C:/tmp/dump_me_here.csv) always works for me. 

    I sometimes have issues with linebreaks, but that's the nature of CSV, nothing to do with rapidminer so I typically export as excel to avoid these issues.

    Have you tried to export to excel? This may not be the format you want but at least you could verify it works that way so we can exclude already some scenario's.

    If you don't mind sharing your process and (limited part) of your data (export process as rmp and attach, same for any sample test data) we can support better. 
    User: "EL75"
    New Altair Community Member
    OP
    Accepted Answer
    Hi Kayman,
    You are definitely right :)
    1 - regarding the export, I've solved the problem. The origin of the issue was that I've added - after the "write CSV operator - a "split data" operator to divise my file in 4 parts, but I've connected the 4 outputs outputs directly to a "store" operator, the connected to the result ports... I've forgotten to add again a "write CSV" operator after each "split data". Sorry for wasting your time, thanks for your patience.

    2- regarding the character [ ' ], you're solution works well :)
    you're the master !
    Wish you the best.