2. Write code statements to list the following, from a dataframe namely sales.

import pandas as pd
sales = pd.DataFrame({‘Item’:[1, 2, 3, 4, 5, 6, 7, 8], ‘Revenue’:[100, 200, 300, 400, 500, 600, 700, 800]})

(a) List only columns ‘Item’ and ‘Revenue’
print(sales[[‘Item’, ‘Revenue’]])

(b) List rows from 3 to 7.
print(sales.iloc[3:8]) # iloc function to print rows from 3 to 7

(c) List the value of cell in 5th row, ‘Item’ column.
print(sales.iloc[4, 0]) # prints 5th row and 0th column (‘Item’)