Indexing and Selecting - Pandas

  Рет қаралды 8,142

Data Talks

Data Talks

Күн бұрын

Пікірлер: 7
@arhataria
@arhataria 4 жыл бұрын
Lecture notes - Indexing and selecting 1. To select the multiple columns: put list into the square bracket 2. Slicing rows with numbers can be confusing: iloc can help you 3. filter data using a boolean series(using loc can be faster) 4. Multi index: very confusing -> use df.reset_index() or df.reset_index(level=0) (certain index out) 5. You can append index - df.set_index('abc', append=True) 6. get 'single' value : using loc can be very slow, use df.at[row,column]
@ExcelTutorials1
@ExcelTutorials1 2 жыл бұрын
That was very helpful! I am good with msexcel, but trying to build my Python skills and this helped a lot!
@kinjalvora3352
@kinjalvora3352 4 жыл бұрын
Hi Nathan, Just wondering: I see that loc is all inclusive so if you are mentioning 2:4, it includes 4 as well, whereas iloc is not. Is that also a reason to maybe use loc more than iloc?
@DataTalks
@DataTalks 4 жыл бұрын
I generally use loc because of clarity! You can easily understand what you are selecting because the column names are written out explicitly ;)
@djjiang3718
@djjiang3718 2 жыл бұрын
Super helpful tutorial! Thank you Nate!
Group By - Pandas
12:22
Data Talks
Рет қаралды 13 М.
How do I use the MultiIndex in pandas?
25:01
Data School
Рет қаралды 174 М.
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 32 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,7 МЛН
Stack, Unstack, Melt, Pivot - Pandas
10:23
Data Talks
Рет қаралды 39 М.
How to combine DataFrames in Pandas | Merge, Join, Concat, & Append
13:40
DataFrame Functions - Pandas
7:01
Data Talks
Рет қаралды 11 М.
How do I select multiple rows and columns from a pandas DataFrame?
21:47
Merge, Join, Append, Concat - Pandas
11:42
Data Talks
Рет қаралды 83 М.
Learn Python Pandas #2 - Data Selection, Viewing, & Indexing
9:14
Derrick Sherrill
Рет қаралды 25 М.
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 32 МЛН