A DataFrame is how Pandas represents a table. You can access columns, rows and individual cells.
Suppose you constructed a DataFrame by
import pandas as pd df = pd.DataFrame({'name': ['Jeff', 'Esha', 'Jia'], 'age': [30, 56, 8]})
Giving you the DataFrame
name | age | |
---|---|---|
1 | Jeff | 30 |
2 | Esha | 56 |
3 | Jia | 8 |
Now, you want to select a value out of the table, say the first name:
first_name = df.name[0]
Define a variable expected_name
with the value first_name
will have.