Skip to content

refactor pandas df.append to pd.concat w/ asserts #3690

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

Merged
merged 4 commits into from
May 2, 2022
Merged

refactor pandas df.append to pd.concat w/ asserts #3690

merged 4 commits into from
May 2, 2022

Conversation

BjoernLudwigPTB
Copy link
Contributor

@BjoernLudwigPTB BjoernLudwigPTB commented Apr 23, 2022

This PR aims to resolve #3602 by replacing all pandas' df.append() calls by pd.concat() calls in alignment with the corresponding 1.4.0 Release Notes. Since there should be no functionality affected, no bug fixed, no interface changed or similar whatsoever, we only changed the according calls in plotly.express and plotly.figure_factory. To make sure we did in fact not change the intermediate results of these calls, we temporarily kept the old calls in, and asserted them equaling our new calls to pd.concat(). Locally all tests passed and after successful pipeline runs we removed these assertions and the old calls, to finally get rid of the FutureWarnings.

This is my first contribution to Plot.ly, so please let me know, if I can improve anything.

As of now the build-doc job keeps failing although I have the impression, that this is unrelated to my changes. Please let me know, if I can do anything to fix this.

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
  • For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well).
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
  • For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).

@BjoernLudwigPTB BjoernLudwigPTB mentioned this pull request Apr 24, 2022
5 tasks
@nicolaskruchten
Copy link
Contributor

Thank you very much for this much-needed PR! I will try to review it in the next 10 days or so, ahead of the next release :)

@nicolaskruchten
Copy link
Contributor

This looks perfect to me! Could you please merge master into this branch and then I can merge?

@nicolaskruchten
Copy link
Contributor

I think I can actually just merge this in, no further action needed :)

@nicolaskruchten nicolaskruchten marked this pull request as ready for review May 2, 2022 13:24
@nicolaskruchten nicolaskruchten merged commit 3fdb43f into plotly:master May 2, 2022
@BjoernLudwigPTB BjoernLudwigPTB deleted the refactor_DataFrame_appends_to_concats branch May 2, 2022 18:25
@BjoernLudwigPTB
Copy link
Contributor Author

Thanks so much. It is a great pleasure to contribute to such an amazing project! Awesome to now be a part of it.

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.

FutureWarning from pandas
2 participants