# pandas data structures tutorial import numpy as np import pandas as pd # standard syntax --> s = pd.Series(data, index=index) # data can be all kinds of things # index is a list of axis labels # what data is # from ndarray '''If data is an ndarray, index must be the same length as data. If no index is passed, one will be created having values [0, ..., len(data) - 1] ''' s = pd.Series(np.random.randn(5), index=['a', 'b', 'c', 'd', 'e']) print(s)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question