Skip to content

Conversation

@blu3-bird
Copy link

Fixes #63144

Summary

Corrects the type annotation and default value for the copy parameter in the astype() docstring to match the actual function signature.

Changes

  • Updated copy parameter from bool, default False to bool or lib.NoDefault, default lib.no_default
  • Location: pandas/core/generic.py, line ~6508

Before:
copy : bool, default False

After:
copy : bool or lib.NoDefault, default lib.no_default

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Thanks for the PR but I'm negative on this change. The use of lib.no_default is just to enable the deprecation. When a user does not specify copy, they still get False behavior.

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.

DOC: Incorrect typing in astype for the copy argument

2 participants