Python | Pandas Series.reset_index() Last Updated : 10 Feb, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.reset_index() function generate a new DataFrame or Series with the index reset. This comes handy when index is need to be used as a column. Syntax: Series.reset_index(level=None, drop=False, name=None, inplace=False) Parameter : level : For a Series with a MultiIndex drop : Just reset the index, without inserting it as a column in the new DataFrame. name : The name to use for the column containing the original Series values. inplace : Modify the Series in place Returns : result : Series Example #1: Use Series.reset_index() function to reset the index of the given Series object. Python3 # importing pandas as pd import pandas as pd # Creating the Series sr = pd.Series([10, 25, 3, 11, 24, 6]) # Create the Index index_ = ['Coca Cola', 'Sprite', 'Coke', 'Fanta', 'Dew', 'ThumbsUp'] # set the index sr.index = index_ # Print the series print(sr) Output : Now we will use Series.reset_index() function to reset the index of the given series object. Python3 1== # reset the index result = sr.reset_index() # Print the result print(result) Output : As we can see in the output, the Series.reset_index() function has reset the index of the given Series object to default. It has preserved the index and it has converted it to a column. Example #2: Use Series.reset_index() function to reset the index of the given Series object. Do not keep the original index labels of the given series object. Python3 # importing pandas as pd import pandas as pd # Creating the Series sr = pd.Series([10, 25, 3, 11, 24, 6]) # Create the Index index_ = ['Coca Cola', 'Sprite', 'Coke', 'Fanta', 'Dew', 'ThumbsUp'] # set the index sr.index = index_ # Print the series print(sr) Output : Now we will use Series.reset_index() function to reset the index of the given series object and also we will be dropping the original index labels. Python3 1== # reset the index result = sr.reset_index(drop = True) # Print the result print(result) Output : As we can see in the output, the Series.reset_index() function has reset the index of the given Series object to default. It has dropped the original index. Comment More infoAdvertise with us Next Article Python | Pandas Series.repeat() S Shubham__Ranjan Follow Improve Article Tags : Pandas Python-pandas Python pandas-series-methods AI-ML-DS With Python Similar Reads Python | Pandas Index.to_series() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.to_series() function create a Series with both index and values equal to 2 min read Python | Pandas Series.repeat() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.repeat() function repeat elem 2 min read Python | Pandas Series.str.index() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas str.index() method is used to search and return lowest index of a substring in 3 min read Python | Pandas Series.ix Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas series is a One-dimensional ndarray with axis labels. The labels need not be un 2 min read Python | Pandas Index.repeat() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.repeat() function repeat elements of an Index. The function returns a new 2 min read Python | Pandas Series.reindex_like() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.reindex_like() function return 3 min read Like