import pandas as pd
s=pd.Series([1,2,3,4,5,6,7])
print(s)
s=pd.Series([1,2,3,4,5,6,7],name="marks")
print(s)
#here we are changing index style from 012 to aa bb cc
s=pd.Series([1,2,3,4],index=['aa','bb','cc','dd'])
print(s)
#series created by dictionary , it is possible with pandas but not in numpy
s=pd.Series({11:"one",2:"two",3:"three",4:"four"})
print(s)
#we used scaler quantity
s=pd.Series(2.12)
print(s)
#here we are changing index style from 012 to aa bb cc. we used scaler quantity
s=pd.Series(2.12,index=['aa','bb','cc','dd'])
print(s)
Comments
Post a Comment