-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
better html repr for DataFrame
#250
Comments
It does look like repr_html on the python side has quite a bit more logic than the JS side. It should be pretty easy to copy over the python html logic. |
It works fine for me using deno-kernel jupyter notebook shows the first 50 rows in order to not crash the browser with large output, but it's configurable using: |
Here is the output from notebook, jupyter console and terminal. In neither of these cases can I reproduce the nice display shown in the README, which happens to be similar to that of the python version |
I am not using |
Ok, here is what i get with So the output contains what is shown in the README nice display but it is not quite the same. |
Indeed please compare the python (arguably reference and certainly more informative) version: You get the shape and the first/last rows/cols shown (controlled by While with nodejs-polars you get the first columns (controlled by
Perhaps to somebody who knows the inner workings of (1) polars-py (2) polars-nodejs (3) the various specifics of the target runtimes, For example I could not find where the selection of rows and cols (first and last selected based on env variables) is performed below polars/polars/dataframe/frame.py | repr_html |
Can you please use:
|
I get the same output! It would be good that nodejs:polars be explicit about what runtimes should implement to output the proper display (as in README). Maybe this is already the case ? If so where ? |
@oscar6echo The formatting discrepancy is because unlike python and rust, there is no native way to overload methods, so we need to use a Proxy object to support some syntaxes such as bracket notation:
Edit:
|
@universalmind303 thx for the insight. So the working syntax with Examples: 1/ small df 2/ larger df
Ok this is your decision - who am I to debate it - but the But this is only a side remark. |
I have thought about deprecating the syntax as I too find the |
This is less a feature request than a question:
But for nodejs-polars only the 50 first rows are shown without indication of df shape.
Is it on purpose or a shortcut ?
Suggestion: If would help users if the py/js displays both in print/console.log and jupyter would match.
The text was updated successfully, but these errors were encountered: