When pandas says “indexes” here, it means index and columns (they are both of type Index).
In [11]: df = pd.DataFrame(np.random.randn(3,2))
In [12]: df.index
Out[12]: Int64Index([0, 1, 2], dtype='int64')
In [13]: df.columns
Out[13]: Int64Index([0, 1], dtype='int64')
- 9 .index Index 2 .columns Index, , ...
, :
In [21]: df = pd.DataFrame(np.random.randn(10,2), index=np.arange(9), columns=np.arange(2))
ValueError: Shape of passed values is (2, 10), indices imply (2, 9)
:
df = pd.DataFrame(np.random.randn(10,2), index=np.arange(10), colummns=np.arange(2))
df = pd.DataFrame(np.random.randn(10,2), index=np.arange(10))
df = pd.DataFrame(np.random.randn(10,2))