-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 updates for Plotly.py version 6 #4840
base: master
Are you sure you want to change the base?
Conversation
LiamConnors
commented
Oct 28, 2024
•
edited
Loading
edited
- Migration guide from v5 to v6
- Add new performance page with info on
- Add new dataframe support information
- Remove pages for removed features
Co-authored-by: Nathan Drezner <[email protected]>
doc/python/performance.md
Outdated
|
||
* Accelerated versions of SVG trace types: `scattergl`, `scatterpolargl`, | ||
* High-performance multidimensional trace types: `splom`, or `parcoords` | ||
* 3-d trace types `scatter3d`, `surface`, `mesh3d`, `cone`, `streamtube` |
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.
I'm more used to seeing 3D
rather than 3-d
(but if we use 3-d
elsewhere in the docs we should keep it for consistency)
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.
Yeah, I agree 3D is better. This is mostly existing content that has been moved to this page. We seem to have a mix, but 3D is used more, so I'll update it.
|
||
### Supported Dataframes | ||
|
||
`px` functions natively support pandas, Polars, and PyArrow dataframes. `px` uses [Narwhals](https://narwhals-dev.github.io/narwhals/) to provide this native dataframe support. Other types of dataframes that are currently supported by Narwhals, for example cuDF and Modin, may also work with `px`. |
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.
Note: Need to make sure we are consistent with messaging about whether Modin is supported (it's included in the list of supported DataFrame types in doc/python/performance.md
)
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.
Good catch. I'd changed it in one but not the other. Thanks!
doc/python/px-arguments.md
Outdated
|
||
#### Additional Dependencies Required | ||
|
||
- To use Polars, PyArrow, or other dataframes supported natively with Plotly Express, you'll need to have NumPy installed. You can install it with: `pip install numpy`. |
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.
A little misleading, since NumPy is required for Pandas dataframes as well, it's just that NumPy is a dependency of Pandas so it's likely to be already installed if you're instantiating a Pandas dataframe.
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.
That's a fair point. Updated
Co-authored-by: Emily KL <[email protected]>
Co-authored-by: Emily KL <[email protected]>
Co-authored-by: Emily KL <[email protected]>
…y.py into version-6-migration
Co-authored-by: Emily KL <[email protected]>
Co-authored-by: Emily KL <[email protected]>
Co-authored-by: Emily KL <[email protected]>
…y.py into version-6-migration
@marthacryan could you take a look at the typed arrays info and let me know if it looks good to you |
|
||
Here's an example using `layout.titlefont`: | ||
|
||
```python |
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.
@LiamConnors I don't love the idea of including code in the docs which specifically won't work.
What if you combine the two code snippets into one, and include the old layout definition as commented-out code, followed by the new layout definition?
Also, maybe it would be clearer to define the layout using a dict(title=dict(...))
rather than go.Layout()
since the former is much more common in my experience — I'm not sure I've ever seen anyone use go.Layout()
.
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.
Yeah, that's a fair point. The complete example probably isn't needed anyway. Reworked to add just a comment with the old method and to use dict rather than go.Layout
@LiamConnors I've been through the whole set of changes -- looks good! Some high-level comments:
|
That's a great point. I think the px-arguments page can be the source of truth. So I've update the performance page to link that for full details on supported dataframe libraries |