Skip to content

Commit

Permalink
add index uniqueness check
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBergeron committed Apr 4, 2024
1 parent f00de99 commit f9e99a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bigframes/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,11 +739,12 @@ def _apply_series_binop_axis_1(
how: str = "outer",
reverse: bool = False,
) -> DataFrame:
# join columns schema
# indexers will be none for exact match
# Somewhat different alignment than df-df so separate codepath for now.
if self.columns.equals(other.index):
columns, lcol_indexer, rcol_indexer = self.columns, None, None
else:
if not (self.columns.is_unique and other.index.is_unique):
raise ValueError("Cannot align non-unique indices")
columns, lcol_indexer, rcol_indexer = self.columns.join(
other.index, how=how, return_indexers=True
)
Expand Down

0 comments on commit f9e99a2

Please sign in to comment.