Source code for afe.core.graph_analyzer.analyzed_results

#########################################################
# Copyright (C) 2022 SiMa Technologies, Inc.
#
# This material is SiMa proprietary and confidential.
#
# This material may not be copied or distributed without
# the express prior written permission of SiMa.
#
# All rights reserved.
#########################################################
# Code owner: Joey Chou
#########################################################
from collections import OrderedDict
from typing import Dict, Union, Tuple, List


[docs] AnalyzedResultType = Union[float, Tuple[float, ...], List[float]]
[docs] class AnalyzedResultDict(OrderedDict): """ A helper class that inherits collections.OrderedDict with additional methods: * to_dataframe() - convert AnalyzedResultDict object to pandas DataFrame """
[docs] def to_dataframe(self) -> Dict[str, "pandas.DataFrame"]: """ Return the AnalyzedResultDict in the pandas.DataFrame format. """ import pandas as pd return pd.DataFrame.from_dict(self).T