If I am right, Mit Ai2 is forcefully adding double quotes and other symbols in the data (eg. numerical data) when we save it as csv file or text file. Because, of this behavior it is difficult to perform certain tasks or to save the output as the expected standard-csv file. Please, don't add quotes forcefully.
If we use replace-segment block to remove the quotes, still it is forcefully adding quotes. If I am right then correct this by providing one more option to avoid forcefully being added quotes/unnecessary symbols from the data. Thankyou.
This is because the widely accepted "correct format for a csv" is to double quote strings. In some cases, integers/numbers may also be double quoted.
It may also depend on where your data comes from, for example, if you export google sheet data as a csv (using the web component), it generally arrives in AI2, as responseContent, without double quotes.
This should not cause you any problems, you do not indicate what problems you are having with this correct csv format? You may need to convert to an AI2 list, and work on the list, before converting back to csv ?
I have to manually remove the quotes and symbols to use the csv file in ecommerce websites to update product details. Because, those site is demanding standard csv file and not quoted csv file.
And another thing is, if i am wishing to use the data from csv file (csv file contains data like 3,2,1,8,5,9,2, etc.) in such a way that each data can be chosen one after other using for loop (and list of lists maybe), when additional symbols are added, these additional symbols are creating confusion to me since i am a beginner. Do I have to remove the symbols to separate each data for putting it in for loop?
You are not really providing any examples or situations that generate the issues you are referring to...
On reflection csv format may not be the best method to exchange data, you might consider json or json arrays as an alternative if working in an html environment. Seems this is an issue of your own making ?
My goal is to check the possibility. If the text file contains data 3,5,8,3,2,6, etc. and if csv file contains the following data
onesignalid1,keyword1
onesignalid2,keyword2
onesignalid3,keyword3
onesignalid4,keyword4
onesignalid5,keyword5
onesignalid6,keyword6
etc.
The data from text file should be considered as row numbers/index and when FOR loop chooses the first data/number from text file, and since the first number is 3, the FOR loop has to parse the onsignalid from row 3 of csv file. The parsed onsignal id will be put in the global variable to send notification to that onesignalid apps and the for loop will do this for all the data of text file.
My goal is to check the possibility first eventhough it may not be the good idea.
I agree you got this output. But, can you split this data using , .If it is possible then please share that result as well. Because when i tried that, the quotes appeared back again.
To put the data in a for loop, we have to separate each data individually, am i right?
So, since the data will turn into lists while i split it, i don't need to bother about the quotes or square brackets around the data, am i right? It will work on FOR loop and on list of lists, am I right?
Your example request popped up after I had moved on. perhaps something like this, I am not too sure what you wanted from your second list in the csv, so I picked the keyword.