import re


def infer_data_items(expressions):
    """
    Examine a pandas expression or list of expressions. Identify data items
    in the expressions by looking for df['<data_item>'].

    Returns as set of strings.
    """
    if not isinstance(expressions, list):
        expressions = [expressions]
    regex1 = "df\[\'(.+?)\'\]"
    regex2 = 'df\[\"(.+?)\"\]'
    data_items = set()
    for e in expressions:
        data_items |= set(re.findall(regex1, e))
        data_items |= set(re.findall(regex2, e))
    return (data_items)