def merge_keep_index(df1, df2, **kwargs):
    """Execute a pandas DataFrame merge, preserving the index of the first dataframe.

    :param pandas.DataFrame df1: first data frame, to call pandas merge from.
    :param pandas.DataFrame df2: second data frame, argument to pandas merge.
    :param \\*\\*kwargs: arbitrary keyword arguments passed to pandas merge call.
    :return: (*pandas.DataFrame*) -- df1 merged with df2 with indices preserved.
    """
    return df1.reset_index().merge(df2, **kwargs).set_index(df1.index.names)