Skip to content

Commit

Permalink
Use iterable as typing istead of list for column_names arg
Browse files Browse the repository at this point in the history
  • Loading branch information
isVoid committed Mar 9, 2022
1 parent 215f298 commit 25e9527
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ def _slice(self: T, arg: slice) -> T:
]
result = self._from_columns_like_self(
libcudf.copying.columns_slice(columns_to_slice, [start, stop])[0],
[*self._column_names],
self._column_names,
None if is_range_index else self._index.names,
)

Expand Down Expand Up @@ -6065,7 +6065,7 @@ def _sample_axis_1(
def _from_columns_like_self(
self,
columns: List[ColumnBase],
column_names: List[str],
column_names: Iterable[str],
index_names: Optional[List[str]] = None,
) -> DataFrame:
result = super()._from_columns_like_self(
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def _from_data(
def _from_columns(
cls,
columns: List[ColumnBase],
column_names: List[str],
column_names: abc.Iterable[str],
index_names: Optional[List[str]] = None,
):
"""Construct a `Frame` object from a list of columns.
Expand Down Expand Up @@ -233,7 +233,7 @@ def _from_columns(
def _from_columns_like_self(
self,
columns: List[ColumnBase],
column_names: List[str],
column_names: abc.Iterable[str],
index_names: Optional[List[str]] = None,
):
"""Construct a `Frame` from a list of columns with metadata from self.
Expand Down

0 comments on commit 25e9527

Please sign in to comment.