Skip to content

substitute deprecated DataFrame.applymap with map #1024

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

Closed
MariusWirtz opened this issue Jan 14, 2024 · 1 comment
Closed

substitute deprecated DataFrame.applymap with map #1024

MariusWirtz opened this issue Jan 14, 2024 · 1 comment

Comments

@MariusWirtz
Copy link
Collaborator

          This works, however, there is a warning when running the updated code:
C:\Python311\Lib\site-packages\TM1py\Services\ElementService.py:347: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df_data[cols_to_format] = df_data[cols_to_format].applymap(lambda x: '{:.6f}'.for

Originally posted by @Cubewise-gtejeda in #999 (comment)

MariusWirtz added a commit that referenced this issue Jan 14, 2024
@MariusWirtz
Copy link
Collaborator Author

This fix must wait. map is not available on DataFrames in pandas < 2.1.
So replacing it would cause backward compatibility.

aws/aws-sdk-pandas#2554

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

No branches or pull requests

1 participant