Q. Write a program to create a Dataframe storing salesmen details (name, zone, sales) of five salesmen.


Answer =




import pandas as pd
import numpy as np
d = {"name":['name1','name2','name30,','name4','name5'],"\
zone":['zone1','zone2','zone3','zone4','zone5'],"sales":[100,200,150,350,250]}

df = pd.DataFrame(d)
print(df)



Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post