Skip to content

Commit 9837682

Browse files
fix DataFrame docstring
1 parent 6cc5a96 commit 9837682

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

pandas/core/frame.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,13 @@ class DataFrame(NDFrame):
314314
315315
Constructing DataFrame from numpy ndarray:
316316
317-
>>> df2 = pd.DataFrame(np.random.randint(low=0, high=10, size=(5, 5)),
318-
... columns=['a', 'b', 'c', 'd', 'e'])
317+
>>> df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
318+
... columns=['a', 'b', 'c'])
319319
>>> df2
320-
a b c d e
321-
0 2 8 8 3 4
322-
1 4 2 9 0 9
323-
2 1 0 7 8 0
324-
3 5 1 7 1 3
325-
4 6 0 2 4 2
320+
a b c
321+
0 1 2 3
322+
1 4 5 6
323+
2 7 8 9
326324
327325
See also
328326
--------

0 commit comments

Comments
 (0)