macpie.pandas.mimic_index_order#

macpie.pandas.mimic_index_order(left: DataFrame, right: DataFrame, axis=None)#

Order the right labels as close as possible to the order of the left labels.

Parameters:
leftDataFrame
rightDataFrame
axis{0 or index, 1 or columns, None}, default None

The axis to mimic on, expressed either as an index (int) or axis name (str). By default this is the info axis, ‘index’ for Series, ‘columns’ for DataFrame.

Returns:
DataFrame

The modified right DataFrame