Source Code:
(back to article)
import pandas as pd df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]}, index=[0, 1, 2]) print(df.iloc[0:2, 0:1])
Result:
Report an issue