Skip to content

Commit 527d1d7

Browse files
Typing
1 parent 92cb1e7 commit 527d1d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/frame.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4585,7 +4585,7 @@ def select(self, *args):
45854585
"""
45864586
if args and isinstance(args[0], list):
45874587
if len(args) == 1:
4588-
args = args[0]
4588+
columns = args[0]
45894589
else:
45904590
raise ValueError(
45914591
"`DataFrame.select` supports individual columns "
@@ -4594,8 +4594,10 @@ def select(self, *args):
45944594
"You can unpack the list if you have a mix: "
45954595
"`df.select(*['col1', 'col2'], 'col3')`."
45964596
)
4597+
else:
4598+
columns = list(args)
45974599

4598-
indexer = self.columns._get_indexer_strict(list(args), "columns")[1]
4600+
indexer = self.columns._get_indexer_strict(columns, "columns")[1]
45994601
return self.take(indexer, axis=1)
46004602

46014603
@overload

0 commit comments

Comments
 (0)