Reputation: 9
I have a CSV file saved in my google drive; this file has text data (questions) I want to link with openai to get some justifications, if I ask these questions manually in prompt, i can get answered, but I need all the question answered in one time,
the first approach is the issue with authentication i got the error: Invalid client secrets file ('Error opening file', 'client_secrets.json', 'No such file or directory, 2)
and I tried another approach to read the csv I got the error utf-8' codec can't decode byte 0xca in position 82: invalid continuation byte
a different approach I tried as below:
gauth = GoogleAuth()
gauth.LocalWebserverAuth() # This will prompt you to authenticate your Google Drive
drive = GoogleDrive(gauth)
import pandas as pd
csvdata=pd.read_csv('/content/drive/My Drive/SBISC.csv')
with open("/content/drive/My Drive/SBISC.csv", 'r') as file:
reader = csv.reader(file)
text_data = ""
for row in reader:
text_data += " ".join(row)
Upvotes: 0
Views: 73