TopNOption¶
- class inmydata.StructuredData.TopNOption(MetricField: str, NumberOfResults: int)
Bases:
object
A class representing a Top N filter for querying data in the inmydata platform. This class encapsulates the details of a Top N filter, including the metric field to calculated the value to filter on, and the number of top or bottom items to return.
- MetricField
The field to filter on.
- Type:
str
- NumberOfResults
The number of top or bottom items to return. Positive numbers indicate top N, negative numbers indicate bottom N.
- Type:
int
Members¶
- __init__(MetricField: str, NumberOfResults: int)
Initializes the TopNUsed with the specified metric field and number of top or bottom items.
- Parameters:
MetricField (str) – The field to filter on.
NumberOfResults (int) – The number of top items to return.
- to_dict()
Converts the TopNUsed instance to a dictionary representation.
- Returns:
A dictionary representation of the TopNUsed instance.
- Return type:
dict