Run
import pandas as pd df1 = pd.DataFrame({'A': ['aa', 'bb'], 'M': ['cc', 'dd'], 'C': ['ee', 'ff']}, index=[2, 5]) #value at index 2 and column name 'M' value1 = df1.at[2, 'M'] print(value1) #value at index 5 and column name 'A' value2 = df1.at[5, 'A'] print(value2)
Output