macpie.pandas.conform#

macpie.pandas.conform(left: DataFrame, right: DataFrame, subset_pair_kwargs={}, dtypes=False, index_order=False, values_order=False, axis=None)#

Conform one Dataframe to another.

Parameters:
leftDataFrame

DataFrame to conform to.

rightDataFrame

DataFrame to conform.

subset_pair_kwargsdict, optional

Keyword arguments to pass to underlying macpie.pandas.subset_pair() to pre-filter columns before comparison.

dtypesbool, default is False

Whether right should be modified to mimic the dtypes of left

index_orderbool, default is False

Whether right should be modified to mimic the index order of left

values_orderbool, default is False

Whether both DataFrames should be sorted by their common labels.

axis{0 or index, 1 or columns, None}, default None

The axis to conform 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:
Tuple[DataFrame, DataFrame]

left and right conformed to each other.