Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion datacompy/fugue.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ def all_columns_match(df1: "AnyDataFrame", df2: "AnyDataFrame") -> bool:
bool
Boolean indicating whether the columns all match in the dataframes
"""
return unq_columns(df1, df2) == unq_columns(df2, df1) == set()
# Optimize: Call get_column_names only once for each df
col1 = fa.get_column_names(df1)
col2 = fa.get_column_names(df2)
return set(col1) == set(col2)


def is_match(
Expand Down