This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pinecone.grpc import PineconeGRPC as Pinecone | |
| import os | |
| import json | |
| import dotenv | |
| import pandas as pd | |
| import pyarrow as pa | |
| import pyarrow.parquet as pq | |
| from pathlib import Path | |
| dotenv.load_dotenv() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Upload vectors from a parquet file to Pinecone using gRPC for improved performance. | |
| Requirements: | |
| - Set PINECONE_API_KEY environment variable or add it to a .env file | |
| - Install dependencies: uv add "pinecone[grpc]" pandas pyarrow python-dotenv | |
| - Change name of parquet file | |
| """ | |
| import pandas as pd |