Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DEP: Deprecate passing a DataFrame to from_records #51697

Merged
merged 8 commits into from
Mar 3, 2023
Merged

Conversation

phofl
Copy link
Member

@phofl phofl commented Feb 28, 2023

cc @jbrockmendel as discussed, restructuring this allows us to simplify to_arrays immediately

if isinstance(data, DataFrame):
warnings.warn(
"Passing a DataFrame to DataFrame.from_records is deprecated. Use "
"set_index and/or drop instead to modify the DataFrame.",
Copy link
Member

Choose a reason for hiding this comment

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

"instead"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why I am using instead or placement of instead within the sentence?

Copy link
Member

Choose a reason for hiding this comment

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

im suggesting adding "instead" at the end of the last sentence

Copy link
Member Author

Choose a reason for hiding this comment

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

changed

@phofl phofl added Deprecate Functionality to remove in pandas DataFrame DataFrame data structure labels Feb 28, 2023
@jbrockmendel
Copy link
Member

small comment, otherwise LGTM

@phofl phofl added this to the 2.1 milestone Feb 28, 2023
@phofl phofl merged commit 3d47fb9 into pandas-dev:main Mar 3, 2023
@phofl phofl deleted the 51353 branch March 3, 2023 19:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
DataFrame DataFrame data structure Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PERF: DataFrame.from_records with DataFrame input
2 participants