Pandas Series is a one-dimensional labelled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.). It has to be remembered that unlike Python lists, a Series will always contain data of the same type.
Let’s see how to create a Pandas Series from the array.
Method #1:Create a series from array without index.
In this case as no index is passed, so by default index will be
range(n) where n is array length.
0 a 1 b 2 c 3 d 4 e dtype: object
Method #2: Create a series from array with index.
In this case we will pass index as a parameter to the constructor.
1000 a 1001 b 1002 c 1003 d 1004 e dtype: object
- Create Pandas Series using NumPy functions
- Python | Pandas Series.cummin() to find cumulative minimum of a series
- Python | Pandas series.cummax() to find Cumulative maximum of a series
- Python | Pandas Series.astype() to convert Data type of series
- Python | Pandas series.cumprod() to find Cumulative product of a Series
- Python | Pandas Series.cumsum() to find cumulative sum of a Series
- Python | Pandas Series.mad() to calculate Mean Absolute Deviation of a Series
- Python | Pandas Series.nonzero() to get Index of all non zero values in a series
- Create pandas dataframe from lists using zip
- Create a Pandas DataFrame from Lists
- Different ways to create Pandas Dataframe
- Create a pandas column using for loop
- Create a list from rows in Pandas DataFrame | Set 2
- Create a Pandas DataFrame from List of Dicts
- Create pandas dataframe from lists using dictionary
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.