-
-
Notifications
You must be signed in to change notification settings - Fork 42
PR: Support Polars dataframes #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor suggestions for you @jitseniesen.
If a remote call leads to an exception with a `name` attribute (e.g., a ModuleNotFoundError), then add this to the JSON in the reply.
Co-authored-by: Carlos Cordoba <[email protected]>
I applied the suggestions and rebased, I think this is ready now. |
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks @jitseniesen!
This PR adds support for displaying Polars data frames in Spyder's variable explorer to the Spyder kernels. The type is shown as "Polars DataFrame" and the value as "Column names: xxx" (same as for Pandas data frames). When the user opens an editor, the Polars data frame is converted to a Pandas data frame and sent to Spyder.
This conversion fails if Pandas is not installed in the console environment. To handle this properly on the Spyder side, the last commit extends the error handling in remote calls to also send the
nameattribute (if it exists) of exceptions raised when handling remote calls. This attribute contains the name of the module whose import failed inModuleNotFoundError.This PR is used in Spyder PR spyder-ide/spyder#24558. See there for a video of how it all looks.