Source Code:
(back to article)
import pandas as pd # Create a sample dataframe data = {'name': ['John', 'Bob', 'Sara'], 'age': [25, 30, 35]} df = pd.DataFrame(data) # Select the row with index 1 (Bob) row = df.iloc[1] print(row)
Result:
Report an issue