Вы можете использовать np.where
:
df = pd.DataFrame(np.zeros((8, 8)))
df.index = [1, 2, 3, 4, 5, 6, 7, 8]
df.columns = [1, 2, 3, 4, 5, 6, 7, 8]
df.iloc[0,0] = "word"
Найдите позицию с помощью:
i, c =np.where(df == "word")
print(df.iloc[i, c])
1
1 word