Q. Using the Series created in Question 5, write commands for the following:

a) Find the dimensions, size and values of the Series EngAlph, Vowels, Friends, MTseries, MonthDays.

b) Rename the Series MTseries as SeriesEmpty.

c) Name the index of the Series MonthDays as monthno and that of Series Friends as Fname.

d) Display the 3rd and 2nd value of the Series Friends, in that order.

e) Display the alphabets ‘e’ to ‘p’ from the Series EngAlph.

f) Display the first 10 values in the Series EngAlph.

g) Display the last 10 values in the Series EngAlph.

h) Display the MTseries.


Answer :-

a =

print(EngAlph.size)
print(EngAlph.values)
"""printing size and values for Vowels, Friends, MTseries, MonthDays is similar as above"""


b =

MTseries.name=’ SeriesEmpty’


c =

MonthDays.index.name=’monthno’
Friends.index.name=’fname’


d =

print(Friends[2])
print(Friends[1])


e =

print(engAlph[[s for s in range(4,16)]])


f =

print(engAlph.head(10))


g =

print(engAlph.tail(10))


h =

print(MTseries)


Post a Comment

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

Previous Post Next Post