13.CREATE THE FOLLOWING DATAFRAME SALES CONTAINING YEAR WISE SALES FIGURES FOR FIVE SALES PERSONS IN INR. USE THE YEARS AS COLUMN LABELS, AND SALES PERSON NAMES AS ROW LABELS.

Solution:- 

import pandas as pd
data = {2014 :[100.5,150.8,200.9,30000,40000],
              2015:[12000,18000,22000,30000,45000],
              2016:[20000,50000,70000,100000,125000],
              2017:[50000,60000,70000,80000,90000]}
sales=pd.DataFrame(data,index=[“Madhu”,”Kusum”,”Kinshuk”,”Ankit”,”Shruti”])
print(sales)
print(sales.index)
print(sales.columns)
print(sales.dtypes)

print(sales.size)
print(sales.shape)
print(sales.values)
print(sales.tail(2))
print(sales.head(2))
print(sales.empty)

 

Output :-