How to Access Columns by Numeric Index in Pandas (Python)

preview_player
Показать описание
↓ Code Available Below! ↓

This video shows how to access the columns of a pandas data frame using the numeric index using iloc. Using numeric indexes to get columns can make it easier to select multiple columns or large ranges of columns since you don't have to know or type out all of the column names.

If you find this video useful, like, share and subscribe to support the channel!

Code used in this Python Code Clip:

import pandas as pd

# Access a column by numerical index

# Access multiple column by numerical index

# Access multiple columns and a subset of rows

# Access columns with a column subset

* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .

Рекомендации по теме
Комментарии
Автор

Is the output in form of array
Cause I'm gonna need it for next step

pranavdeshpande
Автор

Can we access the column by it's name?

hamalishah