12. CREATE A DATAFRAME RESULTDF, CONTAINS

Solution :- 

import pandas as pd
data = {‘Arnab’:[90,91,97,95],
               ‘Ramit’:[92,81,96,86],
               ‘Samridhi’:[89,91,88,95],
               ‘Riya’:[81,71,67,80],
                ‘Mallika’:[94,95,99,95]}
sub = [“Maths”,’Science’,’Hindi’,’English’]
resultdf = pd.DataFrame(data,sub)
print(resultdf)
resultdf.rename(index={‘Maths’:’Mathematics’,’Science’:’Ssc’},inplace=True)
resultdf.rename(columns={‘Arnab’:’Aman’,’Riya’:’Shreya’},inplace=True)
print(resultdf)

Output :-