SciSharp / Pandas.NET

Pandas port for C# and F#, data analysis tool, process multi-dim array in DataFrame.
557 stars 76 forks source link

Create Series From ndarray #6

Open Oceania2018 opened 5 years ago

Oceania2018 commented 5 years ago

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].

In:

s = pd.Series(np.random.randn(5), index=['a', 'b', 'c', 'd', 'e'])

Out:

a    0.4691
b   -0.2829
c   -1.5091
d   -1.1356
e    1.2121
dtype: float64

https://pandas.pydata.org/pandas-docs/stable/dsintro.html