Source Code:
(back to article)
import pandas as pd # Create a sample dataframe df = pd.DataFrame({'A':[1,2,3], 'B':[4,5,6], 'C':[7,8,9]}) # Get the first row value of column 'B' first_row_value = df.at[0, 'B'] print(first_row_value) # Output: 4
Result:
Report an issue