milvus-logo
LFAI
< Docs
  • Python

drop_partition()

This method drops a partition and the data within by name in the specified collection.

Invocation

drop_partition(partition_name, timeout=None, **kwargs)

Parameters

ParameterDescriptionTypeRequired
partition_nameName of the partition to drop.StringTrue
timeoutAn optional duration of time in seconds to allow for the RPC. If it is set to None, the client keeps waiting until the server responds or error occurs.FloatFalse

Return

No return.

Raises

  • CollectionNotExistException: error if the collection does not exist.
  • BaseException: error if the specified partition does not exist.

Example

from pymilvus import Collection
collection = Collection("book")      # Get an existing collection.
collection.drop_partition("novel")
Feedback

Was this page helpful?