def _keys(expr):
    """
    Retrieve keys of a dict

    :param expr: dict sequence / scalar
    :return:
    """
    if isinstance(expr, SequenceExpr):
        dtype = expr.data_type
    else:
        dtype = expr.value_type
    return composite_op(expr, DictKeys, df_types.List(dtype.key_type))
Retrieve keys of a dict

    :param expr: dict sequence / scalar
    :return: