Pandas series with custom index

0 votes
I am using pandas to create a series from a numpy array. The index is 0-n. I want the index to start from 100. How can I do this?
Apr 1 in Python by Simran
76 views

1 answer to this question.

0 votes

You can do it by specifying index. Like this:

import pandas as pd
import numpy as np
data = np.array(['a','b','c','d'])
s = pd.Series(data,index=[100,101,102,103])
print s
answered Apr 1 by Isha

Related Questions In Python

0 votes
2 answers
0 votes
1 answer

How does time series analysis with statsmodels work?

I'd really like to see a data ...READ MORE

answered Sep 4, 2018 in Python by Priyaj
• 56,160 points
879 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to convert pandas dataframe to numpy array?

Irrespective of whether the dataframe has similar ...READ MORE

answered May 12 in Python by Rishi
248 views
0 votes
1 answer
+2 votes
2 answers

How can I replace values with 'none' in a dataframe using pandas

Actually in later versions of pandas this ...READ MORE

answered Aug 13, 2018 in Python by bug_seeker
• 15,310 points
3,794 views
0 votes
1 answer

How to replace values with None in Pandas data frame in Python?

Actually in later versions of pandas this ...READ MORE

answered Aug 30, 2018 in Python by Priyaj
• 56,160 points
551 views