Skip to content

Update docs dependencies and Python version - #4596

Merged
LiamConnors merged 17 commits into
masterfrom
update-docs-build
May 13, 2024
Merged

LiamConnors merged 17 commits into
masterfrom
update-docs-build

Conversation

@LiamConnors

@LiamConnors LiamConnors commented May 1, 2024 •

Copy link
Copy Markdown
Contributor

This PR:

To close #4491

@LiamConnors
LiamConnors marked this pull request as ready for review May 1, 2024 17:46
@LiamConnors
LiamConnors requested review from emilykl and gvwilson May 1, 2024 17:46
Comment thread doc/python/icicle-charts.md Outdated
ie the last level corresponds to the root.
"""
df_all_trees = pd.DataFrame(columns=['id', 'parent', 'value', 'color'])
df_trees = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change but I'm willing to take it on faith :-)

@emilykl emilykl May 6, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LiamConnors My only suggestion here (and at the other spot) is that the df_trees variable be renamed to clarify that it's a list of dfs rather than a df.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry, I should have given more context.

The original example uses df.append, to append each new dataframe in the loop to the first dataframe, but that method was removed.

So here I instead use a list, and add each to a list and use pd.concat on the list instead.

We had to make this update also in the plotly.express library itself at one stage and that's the approach we took: #4190

@emilykl good suggestion. Will update the variable name
pd.concat has existed at least since https://pandas.pydata.org/pandas-docs/version/0.13/generated/pandas.concat.html

Comment thread doc/python/sunburst-charts.md Outdated
ie the last level corresponds to the root.
"""
df_all_trees = pd.DataFrame(columns=['id', 'parent', 'value', 'color'])
df_trees = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, I don't understand this change but am willing to trust you.

Comment thread doc/python/treemaps.md Outdated
ie the last level corresponds to the root.
"""
df_all_trees = pd.DataFrame(columns=['id', 'parent', 'value', 'color'])
df_trees = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above...

@gvwilson gvwilson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are three places where it appears that a single call to Pandas has been replaced by a loop. I don't have enough context to understand the change but am willing to take it on faith; would be happy to discuss.

@emilykl

emilykl commented May 6, 2024

Copy link
Copy Markdown
Contributor

@LiamConnors Are the Pandas example code changes still backwards-compatible with Pandas 1.x?

@LiamConnors
LiamConnors merged commit 1fef3ee into master May 13, 2024
@LiamConnors
LiamConnors deleted the update-docs-build branch May 13, 2024 14:31
LiamConnors added a commit that referenced this pull request Jul 16, 2024
Update docs dependencies and Python version
wavebyrd pushed a commit to wavebyrd/plotly.py that referenced this pull request Mar 13, 2026
Update docs dependencies and Python version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update all docs examples to run on Python 3.10 with later libraries

3 participants