(context, builder, ty, pyval)
Create a constant for Series data.

    Mostly reuses constant creation for pandas arrays.
Create a constant for Series data.
Create a constant for Series data .
def _constant_Series_data(context, builder, ty, pyval):
    """
    Create a constant for Series data.

    Mostly reuses constant creation for pandas arrays.
    """

    from ..categorical.types import CategoricalDtypeType

    # TO-DO: this requires lower_constant to be implemented for other types
    # like indices and so on, until that raise NotImplementedError
    if (isinstance(ty.dtype, CategoricalDtypeType)
            and ty.index is PositionalIndexType(False)
            and ty.is_named is False):
        from ..categorical.boxing import constant_Categorical
        return constant_Categorical(context, builder, ty.data, pyval.array)

    raise NotImplementedError()
def _constant_Series_data ( context , builder , ty , pyval ) : from . . categorical . types import CategoricalDtypeType # TO-DO: this requires lower_constant to be implemented for other types # like indices and so on, until that raise NotImplementedError if ( isinstance ( ty . dtype , CategoricalDtypeType ) and ty . index is PositionalIndexType ( False ) and ty . is_named is False ) : from . . categorical . boxing import constant_Categorical return constant_Categorical ( context , builder , ty . data , pyval . array ) raise NotImplementedError ( )