from langchain.document_loaders import DataFrameLoader
loader = DataFrameLoader(shortdata, page_content_column=“FullDescription”)
xlsdocuments = loader.load()
docsearch = Pinecone.from_documents(xlsdocuments, embeddings, index_name=index_name)
I would like to upsert more data in my existing database, but it always give me ApiException: (400)
Before, the data is from pdf files, now it’s from dataframe, but all in good doc class, only inside meta data, the inner structure is a bit different.
could someone tell me why?
ApiException Traceback (most recent call last)
in <cell line: 3>()
1 from langchain.vectorstores import Pinecone
2
----> 3 docsearch = Pinecone.from_documents(xlsdocuments, embeddings, index_name=index_name)
13 frames
/usr/local/lib/python3.10/dist-packages/pinecone/core/client/rest.py in request(self, method, url, query_params, headers, body, post_params, _preload_content, _request_timeout)
228 raise ServiceException(http_resp=r)
229
→ 230 raise ApiException(http_resp=r)
231
232 return r
ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({‘content-type’: ‘text/plain’, ‘content-length’: ‘80’, ‘date’: ‘Wed, 24 May 2023 14:43:43 GMT’, ‘server’: ‘envoy’, ‘connection’: ‘close’})
HTTP response body: Unexpected token.
Rhinox", “Website”: NaN, “text”: "Rhinox