Q. What is a Series and how is it different from a 1-D array, a list and a dictionary?
Answer :-
A Series is a one-dimensional array containing a sequence of values of any data type (int, float, list, string, etc) which by default have numeric data labels starting from zero
Pandas Series a bit like a specialization of a Python dictionary. A dictionary is a structure that maps arbitrary keys to a set of arbitrary values, and a Series is a structure which maps typed keys to a set of typed values.
Series is a 1D data structure designed for a particular use case which is quite different from a list. Yet they both are 1D, ordered data structures.
In Series we can change index but we cannot do in list.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )