Skip to content

Commit 8d8a0b7

Browse files
committed
DOC: change index to x, y pandas-dev#41407
1 parent 06a04b9 commit 8d8a0b7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pandas/core/frame.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -8812,18 +8812,18 @@ def append(
88128812
88138813
Examples
88148814
--------
8815-
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'), index=[0, 2])
8815+
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'), index=['x', 'y'])
88168816
>>> df
88178817
A B
8818-
0 1 2
8819-
2 3 4
8820-
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=list('AB'), index=[0, 4])
8818+
x 1 2
8819+
y 3 4
8820+
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=list('AB'), index=['x', 'y'])
88218821
>>> df.append(df2)
88228822
A B
8823-
0 1 2
8824-
2 3 4
8825-
0 5 6
8826-
4 7 8
8823+
x 1 2
8824+
y 3 4
8825+
x 5 6
8826+
y 7 8
88278827
88288828
With `ignore_index` set to True:
88298829

0 commit comments

Comments
 (0)