HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to Convert a Pandas Dataframe to a Numpy Array

23,860 views April 11, 2020 6:23

Watch on YouTube
ChannelErik Marsja

Chapters

Description from the creator

In this Python Pandas tutorial, you will learn how to convert a Pandas dataframe to a NumPy array. Specifically, you will learn the three steps it takes to convert a dataframe into an array. Furthermore, you will learn how to select certain columns and change these to an array.

» Make sure you subscribe to the channel if you haven't: bit.ly/SUB2EM

» Blog post: bit.ly/DataframeToArray

If you need to learn more about creating dataframes from Python dictionaries:

» Blog post: bit.ly/dataframe_from_dictionary

» YouTube Video: youtu.be/mJ3IiOjmY-M


» Make sure you subscribe to the Telegram channel: t.me/MarsjaSe


0:00 Introduction
1:10 Step 1: import pandas and numpy
1:27 Step 2: create a dictionary
2:29 Step 3: create a dataframe
2:56 Step 4: convert the dataframe to an array
3:34 Convert a specific column

4:10 Convert specific columns
4:32 Bonus example: dtypes (e.g., ints)
5:17 Conclusion

About this tutorial

Erik Marsja published this 6:23 video tutorial on April 11, 2020. It has been watched 23,860 times on YouTube.

Category
Education
Duration
6:23
Published
April 11, 2020
Views
23,860
Likes
334

Tags

Share

This tutorial in other languages