We can take advantage of the pandas dataframe attrs dictionary to include metadata with the dataframe resulting from a query, which can be parsed by the accessor class methods.
The metadata could be added in the to_pandas() and to_geopandas() methods and could include information describing how the dataframe was created and things like the list of metric pydantic models (include_metrics)
This could then be read by the accessor class to help determine which methods are valid (timeseries vs. metrics) and to set plot characteristics (eg., axis limits, etc)
We can take advantage of the pandas dataframe attrs dictionary to include metadata with the dataframe resulting from a query, which can be parsed by the accessor class methods.
The metadata could be added in the
to_pandas()
andto_geopandas()
methods and could include information describing how the dataframe was created and things like the list of metric pydantic models (include_metrics
)This could then be read by the accessor class to help determine which methods are valid (timeseries vs. metrics) and to set plot characteristics (eg., axis limits, etc)