In [1]:
import pandas as pd
import numpy as np

In [8]:
pd.__version__, np.__version__


Out[8]:
('0.23.1', '1.14.5')

index


In [3]:
i = pd.Index([0,1,2,3])
i


Out[3]:
Int64Index([0, 1, 2, 3], dtype='int64')

In [15]:
string_i = pd.Index(['a','b','c','d'])
string_i


Out[15]:
Index(['a', 'b', 'c', 'd'], dtype='object')

series


In [14]:
s = pd.Series([10,20,30,40],index=i)
print(s)


0    10
1    20
2    30
3    40
dtype: int64

In [10]:
s.index


Out[10]:
Int64Index([0, 1, 2, 3], dtype='int64')

In [ ]: