https://discord.gg/botpress logo
Is there any way to import csv file to Table with ...
# 🤝help
b
Is there any way to import csv file with columns separated by ";" ? , i can only import csv successfully when columns are separated by "," but the data i have uses "," in the sentence
g
everywhere where you have a semi colon you want to replace it with a comma?
u might aswell write a script that pre processes your data, replacing every ; with , then import as normal.
b
If I replace ";" with "," and import it into the table, will the information on the table still be correct? For example: Something, Something; Then, Then. anyway i really appreciate your reply
g
I dont understand your example. but if you have a csv structure (with column headings and everything) but the issue is that they are semi colon delimited (separated) then running a script that replaces all semi colons with commas will work
b
For example, I have 2 columns, Question and Answer, Question: Hello, can I make an appointment? Answer: Okay, I will help you. and when I export the csv, it will be: Hello, can I make an appointment?; Okay, I will help you. if I replace ";" with ",", will the data still be correct when importing the table or will it become: Question: Hello Answer: Can I make an appointment?, Okay, I will help you.
g
okay, the column headings wont be imported. but the columns will be. I have a question, why are you putting question and answers in a table?
b
I think the ai agent will find more accurate information for the table when the data is arranged by columns instead of text.
I can also refine my questions and answers when the text format knowledge base file does not allow me to edit
g
personally i wouldnt do it that way but if thats how you will do it, if i was you id paste your csv into gpt and ask it to generate the column headers so that you dont have question and answer as headers.
w
Import your CSV in Excel or LibreOffice or Google sheet or any other spread sheet editor, then export it in CSV changing separator