-
-
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
Update docs dependencies and Python version #4596
Conversation
doc/python/icicle-charts.md
Outdated
@@ -305,7 +305,7 @@ def build_hierarchical_dataframe(df, levels, value_column, color_columns=None): | |||
Levels are given starting from the bottom to the top of the hierarchy, | |||
ie the last level corresponds to the root. | |||
""" | |||
df_all_trees = pd.DataFrame(columns=['id', 'parent', 'value', 'color']) | |||
df_trees = [] |
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 don't understand this change but I'm willing to take it on faith :-)
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 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.
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, 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
doc/python/sunburst-charts.md
Outdated
@@ -355,7 +355,7 @@ def build_hierarchical_dataframe(df, levels, value_column, color_columns=None): | |||
Levels are given starting from the bottom to the top of the hierarchy, | |||
ie the last level corresponds to the root. | |||
""" | |||
df_all_trees = pd.DataFrame(columns=['id', 'parent', 'value', 'color']) | |||
df_trees = [] |
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.
again, I don't understand this change but am willing to trust you.
doc/python/treemaps.md
Outdated
@@ -316,7 +316,7 @@ def build_hierarchical_dataframe(df, levels, value_column, color_columns=None): | |||
Levels are given starting from the bottom to the top of the hierarchy, | |||
ie the last level corresponds to the root. | |||
""" | |||
df_all_trees = pd.DataFrame(columns=['id', 'parent', 'value', 'color']) | |||
df_trees = [] |
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.
as above...
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.
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.
@LiamConnors Are the Pandas example code changes still backwards-compatible with Pandas 1.x? |
Update docs dependencies and Python version
This PR:
np.int
anddf.append
. https://pandas.pydata.org/docs/dev/whatsnew/v2.0.0.html#removal-of-prior-version-deprecations-changesgeoparse
from Update Plotly.py version for docs #4594 - no longer required with latest version ofpandas
To close #4491