macpie.pandas.mimic_dtypes#
- macpie.pandas.mimic_dtypes(left: DataFrame, right: DataFrame, categorical=True)#
Cast column data types in
right
to be the same as those inleft
where the column name is the same.- Parameters:
- leftDataFrame
- rightDataFrame
- categoricalbool, default is True
Whether to also ensure categorial data type internals are the same.
- Returns:
- DataFrame
The modified
right
DataFrame