Informatics Practices
Write commands to print following details of a Series object seal :
(a) if the series is empty
(b) indexes of the series
(c) The data type of underlying data
(d) if the series stores any NaN values
Python Pandas
9 Likes
Answer
(a)
seal.empty
(b)
seal.index
(c)
seal.dtype
(d)
seal.hasnans
Answered By
5 Likes
Related Questions
How is a Series object different from and similar to ndarrays ? Support your answer with examples.
Write single line Pandas statement for the following. (Assuming necessary modules have been imported) :
Declare a Pandas series named Packets having dataset as :
[125, 92, 104, 92, 85, 116, 87, 90]
Given the following Series S1 and S2 :
S1 A 10 B 40 C 34 D 60 S2 A 80 B 20 C 74 D 90 Write the command to find the sum of series S1 and S2.
Consider two objects x and y. x is a list whereas y is a Series. Both have values 20, 40, 90, 110.
What will be the output of the following two statements considering that the above objects have been created already ?
(a) print (x*2)
(b) print (y*2)
Justify your answer.