Q. How is a Series object different from and similar to ndarrays? Support your answer with examples.


 

Answer =

Series is 1D structure. It is a homogeneous data structure. Mutable type but size is immutable.
NDarray is an N Dimensional array.

Example:-
A   2-dimensional array of size 2 x 3

x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)
type(x)
<class 'numpy.ndarray'>



Post a Comment

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

Previous Post Next Post