Skip to content

Addressed comments for doc update #37699

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
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ class DataFrame(NDFrame, OpsMixin):

Parameters
----------
data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame
Dict can contain Series, arrays, constants, dataclass or list-like objects. If
data : ndarray (structured or homogeneous), Iterable, dict, dataclass or DataFrame
Dict can contain Series, arrays, constants, or list-like objects. If
data is a dict, column order follows insertion-order.

.. versionchanged:: 0.25.0
Expand Down Expand Up @@ -426,8 +426,9 @@ class DataFrame(NDFrame, OpsMixin):

>>> from dataclasses import make_dataclass
>>> Point = make_dataclass("Point", [("x", int), ("y", int)])
>>> pd.DataFrame([Point(0, 0), Point(0, 3), Point(2, 3)])
x y
>>> df3 = pd.DataFrame([Point(0, 0), Point(0, 3), Point(2, 3)])
df3
x y
0 0 0
1 0 3
2 2 3
Expand Down