Skip to content

Commit

Permalink
apply suggestions 2
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Chigarev <[email protected]>
  • Loading branch information
dchigarev committed Nov 16, 2023
1 parent 6cd1472 commit 24b75c0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions modin/core/dataframe/pandas/metadata/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(
)
# columns with unknown dtypes (they're not described by 'remaining_dtype')
if cols_with_unknown_dtypes is not None and len(
set(cols_with_unknown_dtypes)
np.unique(cols_with_unknown_dtypes)
) != len(cols_with_unknown_dtypes):
raise NotImplementedError(
"Duplicated column names are not yet supported by DtypesDescriptor"
Expand Down Expand Up @@ -223,7 +223,7 @@ def lazy_get(
if self.columns_order is not None:
ids = [self.columns_order[i] for i in ids]
else:
raise NotImplementedError(
raise ValueError(
"Can't lazily get columns by positional indixers if the columns order is unknown"
)

Expand Down Expand Up @@ -331,10 +331,7 @@ def equals(self, other: "DtypesDescriptor") -> bool:
== set(other._cols_with_unknown_dtypes)
and self._remaining_dtype == other._remaining_dtype
and self._schema_is_known == other._schema_is_known
and (
self.columns_order == other.columns_order
or (self.columns_order is None and other.columns_order is None)
)
and self.columns_order == other.columns_order
and self._know_all_names == other._know_all_names
)

Expand Down

0 comments on commit 24b75c0

Please sign in to comment.