def index_fixer(x_init, y_init):
    """
    :param x_init: input X df
    :param y_init: input y
    :return: X,y with aligned indices
    """
    y0 = y_init.dropna(how='any', axis=0)
    x0 = x_init.dropna(how='any', axis=0)
    common_indices = x0.index.intersection(y0.index)
    y_final = y0.loc[common_indices]
    x_final = x0.loc[common_indices]
    return x_final, y_final