Class Avg (2.16.0)

Avg(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Average of the values of the requested field.

  • Only numeric values will be aggregated. All non-numeric values including NULL are skipped.

  • If the aggregated values contain NaN, returns NaN. Infinity math follows IEEE-754 standards.

  • If the aggregated value set is empty, returns NULL.

  • Always returns the result as a double.

Attribute

NameDescription
field google.cloud.firestore_v1.types.StructuredQuery.FieldReference
The field to aggregate on.