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

Added the note of class DataFrame #44719

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ class DataFrame(NDFrame, OpsMixin):
data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame
Dict can contain Series, arrays, constants, dataclass or list-like objects. If
data is a dict, column order follows insertion-order. If a dict contains Series
which have an index defined, it is aligned by its index.
which have an index defined, it is aligned by its index.For best performance,
Copy link
Contributor

Choose a reason for hiding this comment

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

well the problem here is an object that doesn't object the array protocol.

iterable objects, such as a Pytorch Tensor, that can efficiently be converted
to a Numpy Array,should be converted before passing it to pd.DataFrame.

.. versionchanged:: 0.25.0
If data is a list of dicts, column order follows insertion-order.
Expand Down