The Python Oracle

How do I convert a Pandas series or index to a NumPy array?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Peaceful Mind

--

Chapters
00:00 Question
00:21 Accepted answer (Score 377)
01:10 Answer 2 (Score 75)
01:31 Answer 3 (Score 67)
05:49 Answer 4 (Score 49)
06:19 Thank you

--

Full question
https://stackoverflow.com/questions/1724...

Answer 2 links:
[this section of the v0.24.0 release notes]: https://pandas.pydata.org/pandas-docs/st...
[to_numpy()]: https://pandas.pydata.org/pandas-docs/st...
[DataFrames]: http://pandas.pydata.org/pandas-docs/sta...
[array]: https://pandas.pydata.org/pandas-docs/st...
[ExtensionArray]: https://pandas.pydata.org/pandas-docs/st...
[GH19954]: https://github.com/pandas-dev/pandas/iss...
[GH23623]: https://github.com/pandas-dev/pandas/iss...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #pandas

#avk47