Top Five Tricks for Coding in Pandas - with Matt Harrison

  Рет қаралды 10,727

Super Data Science: ML & AI Podcast with Jon Krohn

Super Data Science: ML & AI Podcast with Jon Krohn

Күн бұрын

Пікірлер: 24
@alwayz247
@alwayz247 9 ай бұрын
I'm a R tidyverse user who switched to Python. I've been chaining most of my pandas expressions because that comes natural to me (as a tidyverse user). I chain it without the parenthesis, but rather use backslash to go to new line. It has pros and cons. The main pro is I can select partial code and run it in VSCode interactive similar to that in R. It's still not a replacement for R but it's close. It looks like this: df\ .assign(value2 = lambda df_: df_['value']**2)\ .groupby('type')\ .agg(value2_sum = ('value2', 'sum'))\ .reset_index() I can select the code upto and including the first assign, run that first, check the results, and then run the rest. In this case, it's a trivial code. But in a complex chain, this can be very helpful.
@BrokenRecord-i7q
@BrokenRecord-i7q 9 ай бұрын
Love R!
@mabenba
@mabenba 2 жыл бұрын
Amazing clip. I love the idea of chainning that Matt presented. I come from R as well and it truly feels like piping.
@JonKrohnLearns
@JonKrohnLearns 2 жыл бұрын
Likewise! It makes the code so easy to read and understand.
@Kinnoshachi
@Kinnoshachi 2 жыл бұрын
Amazing! My two favorite internet teachers !!
@JonKrohnLearns
@JonKrohnLearns 2 жыл бұрын
Delighted to serve you!
@BrokenRecord-i7q
@BrokenRecord-i7q 9 ай бұрын
Chaining is a great tip :)
@sitrakaforler8696
@sitrakaforler8696 Жыл бұрын
cool tricks !
@coopernik
@coopernik 9 ай бұрын
11:10 pandas has a nice .pipe method
@CaribouDataScience
@CaribouDataScience 2 жыл бұрын
The number on trick.. switch to R and tidyverse :)
@JonKrohnLearns
@JonKrohnLearns 2 жыл бұрын
😂
@jbj926
@jbj926 Жыл бұрын
Chaining isn’t that deep. So much exaggerations going on in the first half of the video. I chain when it make sense and don’t when it doesn’t matter which is basically all the time for all of data science.
@JonKrohnLearns
@JonKrohnLearns Жыл бұрын
Great that that's your opinion and experience! However, my opinion and experience is in line with the level of enthusiasm I have for chaining - as far as I'm concerned, I was not exaggerating :)
@jbj926
@jbj926 Жыл бұрын
@@JonKrohnLearns my fault. You weren’t exaggerating. I now regret even saying anything because you’ve been a good steward for DS. Matt, however, imo is trying too hard to push changing. Clearly it has use cases but it’s not the end of the world if someone does not chain.
@JonKrohnLearns
@JonKrohnLearns Жыл бұрын
@@jbj926 yeah, fair enough!
@peeintea
@peeintea 2 жыл бұрын
Intro is terrible, way too loud and the sound is annoying. Please change it. But the conversation is great.
@JonKrohnLearns
@JonKrohnLearns 2 жыл бұрын
Ah damn, that's too bad, Jurek - I love it and think it's super slick (I was not involved in the creation of it in any way; I just think it's really awesome)! I don't think we'll be getting rid of it. Would love to hear others' opinions on this though!
@indus2059
@indus2059 2 жыл бұрын
@@JonKrohnLearns I found this insightful. I had no problems with either the intro or sound. Thanks Jon!
@JonKrohnLearns
@JonKrohnLearns 2 жыл бұрын
@@indus2059 delighted to hear it :)
@JonKrohnLearns
@JonKrohnLearns 2 жыл бұрын
@@stanshelton4592 yeah, what are your thoughts on it?
@Kinnoshachi
@Kinnoshachi 2 жыл бұрын
@@JonKrohnLearns just need to normalize the volume of the intro, it’s a bit loud, or it’s fine because if the listener is too annoyed by the 3 sec intro they may be less likely to stay and or learn anyways, however if the listener was sleepy like me it would jolt them to attention and they would be more ready to learn 😂
@richardbennett4365
@richardbennett4365 2 жыл бұрын
Good stuff. The guest says "parenthese" for the singular form of parentheses when in fact, the correct form is parenthesis. He might have missed that point in elementary school.
@skf957
@skf957 Жыл бұрын
Karen: noun, M or F
SDS 557: Effective Pandas - with Matt Harrison
1:29:19
Super Data Science: ML & AI Podcast with Jon Krohn
Рет қаралды 22 М.
Top 10 Pandas Tips and Tricks
18:50
Martin Bel
Рет қаралды 2,2 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 681 М.
Каха и дочка
00:28
К-Media
Рет қаралды 2,9 МЛН
УДИВИЛ ВСЕХ СВОИМ УХОДОМ!😳 #shorts
00:49
1000x faster data manipulation: vectorizing with Pandas and Numpy
26:39
Tutorials - Matt Harrison: Getting Started with Polars
2:14:28
PyCon US
Рет қаралды 15 М.
Matt Harrison - Keynote PyCon Colombia 2024
51:08
PyCon Colombia
Рет қаралды 422
This INCREDIBLE trick will speed up your data processes.
12:54
Rob Mulla
Рет қаралды 270 М.
GraphRAG: The Marriage of Knowledge Graphs and RAG: Emil Eifrem
19:15
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 277 М.