How to fetch data from csv file? actions.py (901 Bytes)
I tried Like this but it is not working This is my csv file Book1.csv (546 Bytes)
can anyone please help me to solve this issue
How to fetch data from csv file? actions.py (901 Bytes)
I tried Like this but it is not working This is my csv file Book1.csv (546 Bytes)
can anyone please help me to solve this issue
Try without the ./data/
just data/
.
.
means the current working directory in bash but you are in python which doesn’t understand this POSIX syntax.
You could alternatively use pathlib
to retrive the absolute path of a relative file.
from pathlib import Path
my_csv_file = Path("./data/...").resolve() # Here you can use POSIX format
Thanks for replying
I am not getting answer which is in csv file
@ChrisRahme can you solve this issue
@Kushala check the path of data and where you created the dan.yml
You relative path is not right that’s why it showing error.
If you sort the path it will fetch and return the output.
@Kushala this is my code is that right?? If so see the steps I have mentioned.
It has created dan.yml file but there is a answer in it ,its not a question part
can please check my Book1.csv
Book1.csv (550 Bytes)
it is in the format of question,answer
I just think that you don’t have enough examples to describe this intent well. You should try to add more as I think your bot has just not enough information to predict the correct intent and thus trigger your action.
its not fetching data from csv file getting an error like this ( The UnexpecTED Intent Policy is currently experimental and might change or be removed in the future �🔬 Please share your feedback on it in the forum (http://forum.rasa.com) to help us make this ature ready for production.)
actions.py (1.5 KB) Book1.csv (888 Bytes) domain.yml (613 Bytes)
can you please check the code , it as created a dan.yml it is having questions how to get answers in response which is present in csv file