Skip to content
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

docs: Add example of unpivoting multiple sets of columns (#18513) #18519

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mdavis-xyz
Copy link
Contributor

Solves #18513

@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars labels Sep 2, 2024
@mdavis-xyz mdavis-xyz force-pushed the 18513-doc-unpivot-multi branch from 3879364 to 09abae8 Compare September 2, 2024 12:35
@mdavis-xyz
Copy link
Contributor Author

I haven't built the docs locally yet. I'm trying. It seems that building the docs requires compilation of the whole library itself. Is that right?

@mdavis-xyz
Copy link
Contributor Author

Ok I've found out how to render the docs. But I can't see how to navigate to the API docs. All the links, search results etc link to the live prod website, not localhost.

Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.92%. Comparing base (6076421) to head (9ef0f14).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18519      +/-   ##
==========================================
- Coverage   79.93%   79.92%   -0.02%     
==========================================
  Files        1505     1505              
  Lines      202628   202628              
  Branches     2873     2873              
==========================================
- Hits       161976   161942      -34     
- Misses      40104    40138      +34     
  Partials      548      548              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MarcoGorelli
Copy link
Collaborator

MarcoGorelli commented Sep 2, 2024

probably - for docs I normally cd to py-polars/docs and do make html then cd build/html and python -m http.server, then navigate to localhost:8000

could you rewrite the example without the extra square bracket, i.e.

        ...     .select(
        ...         "PRODUCT",
        ...         pl.struct(QTY="QUANTITY1", PRICE="PRICE1").alias("PQ1"),
        ...         pl.struct(QTY="QUANTITY2", PRICE="PRICE2").alias("PQ2")
        ...     )

and run make pre-commit too please?

then I think it should be good to go, this seems like a clear improvement


(and also make the same change for DataFrame.unpivot?)

@mdavis-xyz
Copy link
Contributor Author

Done. And I also made the same changes to DataFrame.unpivot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants