def add_month_year_columns(data, datetime_field):
    """Adds month and year columns to a DataFrame using a timestamp column.

    :param data: The DataFrame
    :type data: DataFrame
    :param datetime_field: The datetime fields name
    :type datetime_field: str
    :returns: Altered DataFrame"""
    data['year'] = data[datetime_field].dt.year
    data['month'] = data[datetime_field].dt.month
    return data