Skip to content

Create Series From ndarray #6

Open
@Oceania2018

Description

@Oceania2018

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions