def detect_pattern(pattern, data):
    """
    Detect a candlestick pattern using a DataFrame.

    :param str pattern: name of pattern to be detected
    :param pd.DataFrame data: pandas DataFrame with open, high, low, close data
    :return pd.Series: for each DataFrame entry a 100, 0 or -100 will be returned
    """
    fn = getattr(__import__(__name__), pattern)
    return fn(data)