emgeee commented on code in PR #867:
URL: https://github.com/apache/datafusion-python/pull/867#discussion_r1752678860


##########
src/dataframe.rs:
##########
@@ -70,8 +73,9 @@ impl PyDataFrame {
         if let Ok(key) = key.extract::<PyBackedStr>() {
             // df[col]
             self.select_columns(vec![key])
-        } else if let Ok(tuple) = key.extract::<&PyTuple>() {
+        } else if let Ok(tuple) = key.extract::<Py<PyTuple>>() {
             // df[col1, col2, col3]
+            let tuple = tuple.bind(key.py());

Review Comment:
   What's the difference between extract() and downcast()? I was trying to 
figure it out with chatgpt and failed 😆 



-- 
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]

Reply via email to