🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

milvus-logo
LFAI
< Docs
  • Python

num_entities()

This method counts the number of rows in a collection.

Invocation

num_entities(
    collection_name,
    timeout
)

Parameters

ParameterDescriptionTypeRequired
collection_nameName of the collection to count rows.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

Number of rows.

Raises

None

Example

from pymilvus import MilvusClient

client = MilvusClient(uri, token)

client.num_entities(collection_name='my-collection')

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?