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

Fix: Replace deprecated DataFrame.applymap with map for compatibility #33532

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pushkar3119
Copy link

This pull request replaces the deprecated DataFrame.applymap function with map in the file pcoll_visualization.py. The change ensures compatibility with newer versions of pandas and avoids deprecation warnings during execution.

The modification is minimal and focuses only on updating the function to maintain functionality and improve codebase compatibility.

Copy link
Contributor

github-actions bot commented Jan 8, 2025

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@@ -420,7 +420,7 @@ def _display_dataframe(self, data, update=None):
format_window_info_in_dataframe(data)
# Convert the dataframe into rows, each row looks like
# [column_1_val, column_2_val, ...].
rows = data.applymap(lambda x: str(x)).to_dict('split')['data']
rows = data.apply(lambda col: col.map(lambda x: str(x))).to_dict('split')['data']
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, this change looks good, but it looks like it breaks our formatting. Would you mind running the linter and formatter? https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=95653376#PythonTips-LintandFormattingChecks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants