예제 #1
0
def detect_type(data: Sequence,
                typeset: VisionsTypeset) -> Union[Dict[str, T], T]:
    """Detect the type in the base graph

    Args:
        data: the DataFrame to detect types on
        typeset: the Typeset that provides the type context

    Returns:
        A dictionary with a mapping from column name to type
    """
    return typeset.detect_type(data)
예제 #2
0
def detect_type(
    data: Union[pd.Series, pd.DataFrame], typeset: VisionsTypeset
) -> Union[Dict[str, Type[VisionsBaseType]], Type[VisionsBaseType]]:
    """Detect the type in the base graph

    Args:
        df: the DataFrame to detect types on
        typeset: the Typeset that provides the type context

    Returns:
        A dictionary with a mapping from column name to type
    """
    return typeset.detect_type(data)