how to access dataframe values in python code example Example 1: get column pandas column = df["column_name"] Example 2: how to get value from dataframe pandas sub_df.iloc[0]