Informatics Practices
To get the number of dimensions of a Series object, …………… attribute is displayed.
- index
- size
- itemsize
- ndim
Python Pandas
2 Likes
Answer
ndim
Reason — The ndim attribute is used to get the number of dimensions (axis) of a Series object. The syntax is <Series object>.ndim.
Answered By
1 Like
Related Questions
To create an empty Series object, you can use :
- pd.Series(empty)
- pd.Series(np.NaN)
- pd.Series( )
- all of these
To specify datatype
int16for a Series object, you can write :- pd.Series(data = array, dtype = int16)
- pd.Series(data = array, dtype = numpy.int16)
- pd.Series(data = array.dtype = pandas.int16)
- all of the above
To get the size of the datatype of the items in Series object, you can display …………… attribute.
- index
- size
- itemsize
- ndim
To get the number of elements in a Series object, …………… attribute may be used.
- index
- size
- itemsize
- ndim