def getSMA(dataframe, period, on):
    """
    Calculated the Simple Moving Average.

    Args:
        dataframe: pandas dataframe.
        period: the value for moving average window.
        on: requested column (e.g: Adj close, close, etc).


    Returns:
        dataframe containing the sma as a column.
    """

    return dataframe[on].rolling(period).mean()