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-i7q9 ай бұрын
Love R!
@mabenba2 жыл бұрын
Amazing clip. I love the idea of chainning that Matt presented. I come from R as well and it truly feels like piping.
@JonKrohnLearns2 жыл бұрын
Likewise! It makes the code so easy to read and understand.
@Kinnoshachi2 жыл бұрын
Amazing! My two favorite internet teachers !!
@JonKrohnLearns2 жыл бұрын
Delighted to serve you!
@BrokenRecord-i7q9 ай бұрын
Chaining is a great tip :)
@sitrakaforler8696 Жыл бұрын
cool tricks !
@coopernik9 ай бұрын
11:10 pandas has a nice .pipe method
@CaribouDataScience2 жыл бұрын
The number on trick.. switch to R and tidyverse :)
@JonKrohnLearns2 жыл бұрын
😂
@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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
@@jbj926 yeah, fair enough!
@peeintea2 жыл бұрын
Intro is terrible, way too loud and the sound is annoying. Please change it. But the conversation is great.
@JonKrohnLearns2 жыл бұрын
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!
@indus20592 жыл бұрын
@@JonKrohnLearns I found this insightful. I had no problems with either the intro or sound. Thanks Jon!
@JonKrohnLearns2 жыл бұрын
@@indus2059 delighted to hear it :)
@JonKrohnLearns2 жыл бұрын
@@stanshelton4592 yeah, what are your thoughts on it?
@Kinnoshachi2 жыл бұрын
@@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 😂
@richardbennett43652 жыл бұрын
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.