mongoframes/frames.py
def count(cls, filter=None, **kwargs):
        """Return a count of documents matching the filter"""
        from mongoframes.queries import Condition, Group, to_refs

        if isinstance(filter, (Condition, Group)):
            filter = filter.to_dict()

        filter = to_refs(filter)

        if filter:
            return cls.get_collection().count_documents(
                to_refs(filter),
                **kwargs
            )
        else:
            return cls.get_collection().estimated_document_count(**kwargs)
Return a count of documents matching the filter
Return a count of documents matching the filter
Return a count of documents matching the filter
def count(cls, filter=None, **kwargs):
        from mongoframes.queries import Condition, Group, to_refs
        if isinstance(filter, (Condition, Group)):
            filter = filter.to_dict()
        filter = to_refs(filter)
        if filter:
            return cls.get_collection().count_documents(
                to_refs(filter),
                **kwargs
            )
        else:
            return cls.get_collection().estimated_document_count(**kwargs)
def count ( cls , filter = None , ** kwargs ) : from mongoframes . queries import Condition , Group , to_refs if isinstance ( filter , ( Condition , Group ) ) : filter = filter . to_dict ( ) filter = to_refs ( filter ) if filter : return cls . get_collection ( ) . count_documents ( to_refs ( filter ) , ** kwargs ) else : return cls . get_collection ( ) . estimated_document_count ( ** kwargs )
Return a count of documents matching the filter
Return a count of documents matching the filter
"""Return a count of documents matching the filter"""
cls
filter