Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Series From ndarray #6

Open
Oceania2018 opened this issue Nov 12, 2018 · 0 comments
Open

Create Series From ndarray #6

Oceania2018 opened this issue Nov 12, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Oceania2018
Copy link
Member

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

@Oceania2018 Oceania2018 added the enhancement New feature or request label Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants