HyukjinKwon commented on code in PR #42828:
URL: https://github.com/apache/spark/pull/42828#discussion_r1317985272
##########
python/pyspark/sql/dataframe.py:
##########
@@ -3455,8 +3455,14 @@ def __getitem__(self, item: Union[int, str, Column,
List, Tuple]) -> Union[Colum
return self.filter(item)
elif isinstance(item, (list, tuple)):
return self.select(*item)
- elif isinstance(item, int):
- jc = self._jdf.apply(self.columns[item])
+ elif isinstance(item, int) and not isinstance(item, bool):
Review Comment:
Allowing `bool` is fine since `bool` inherits `int` in Python.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]