Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To remove all vectors within a specific namespace index in Pinecone, you can follow these steps:

  1. Connect to your Pinecone instance using your API key.
  2. Specify the namespace you want to remove vectors from using the pinecone.Index object.
  3. Call the delete method on the pinecone.Index object with the ids parameter set to None to delete all vectors within the namespace.

Here is an example code snippet:

import pinecone

pinecone.init(api_key="<your-api-key>")

index_name = "my-namespace"
index = pinecone.Index(index_name)

index.delete(ids=None)

pinecone.deinit()

Note that this will remove all vectors within the specified namespace in Pinecone, so use with caution.