pandas - how to access cell in pandas, equivalent of df[3,4] in R

dataframe, indexing, pandas

Solution

You can use iloc (to get by position):

df.iloc[3,4]

I recommend reading the indexing section of the docs.

Problem

If I have a pandas DataFrame object, how do I simply access a cell? In R, assuming my data.frame is called df, I can access the 3rd row and 4th column by ``` df[3,4] ``` What is the equivalent in python?

Original source