def calc_sma(df, window, column, new_column_name):
    """Calculate simple moving averages.

    Calculate SMA for data frame columns and expand data
    frame with simple moving averages.

    :param df: Input/output data frame
    :param window: Number of data points to use in moving average
    :param column: which columns in data frame to perform calculations on
    :param trim: Whether or not to trim NaN values
    :type df: ``pandas.DataFrame()`` [``float``]
    :type window: ``int``
    :type column: ``str``
    :returns: Input dataframe with added sma column
    :rtype: ``pandas.DataFrame()`` [``float``]
    """
    df[new_column_name] = df[column].rolling(window).mean()
    return df
