modin.pandas.DataFrame.compare¶
- DataFrame.compare(other, align_axis=1, keep_shape: bool = False, keep_equal: bool = False, result_names=('self', 'other')) DataFrame[source]¶
Compare to another DataFrame and show the differences.
- Parameters:
other (DataFrame) – DataFrame to compare with.
align_axis ({{0 or 'index', 1 or 'columns'}}, default 1) –
Which axis to align the comparison on.
- 0, or ‘index’Resulting differences are stacked vertically
with rows drawn alternately from self and other.
- 1, or ‘columns’Resulting differences are aligned horizontally
with columns drawn alternately from self and other.
Snowpark pandas does not yet support 1 / ‘columns’.
keep_shape (bool, default False) –
If true, keep all rows and columns. Otherwise, only keep rows and columns with different values.
Snowpark pandas does not yet support keep_shape = True.
keep_equal (bool, default False) –
If true, keep values that are equal. Otherwise, show equal values as nulls.
Snowpark pandas does not yet support keep_equal = True.
result_names (tuple, default ('self', 'other')) –
How to distinguish this dataframe’s values from the other’s values in the result.
Snowpark pandas does not yet support names other than the default.
- Returns:
The result of the comparison.
- Return type:
See also
Series.compareShow the differences between two Series.
DataFrame.equalsTest whether two DataFrames contain the same elements.
Notes
Matching null values, such as None and NaN, will not appear as a difference.
Examples
Align the differences on columns