I have below pandas dataframe
import pandas as pd
df = pd.DataFrame({'product name': ['laptop', 'printer', 'printer',], 'price': [1200, 150, 1200], 'price1': [1200, 150, 1200]})
Now I want to print one single row
df.iloc[1,:]
This gives below result
product name printer
price 150
price1 150
Name: 1, dtype: object
As can be seen here, above display is a column format. Is it possible to preserve the row format of original dataframe
when displaying a single row?