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