Skip to content

Update 471-pandas-workout.txt #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions transcripts/471-pandas-workout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

00:02:25 me on the socials and I'm happy to talk about it. Hope to see you there.

00:02:27 Ruven, welcome back to Talk Python To Me. How are you doing?
00:02:27 Reuven, welcome back to Talk Python To Me. How are you doing?

00:02:32 I'm doing great. Great to be back here. Nice to see you.

Expand Down Expand Up @@ -112,7 +112,7 @@

00:04:28 waited a while, cause it'd been like a year between the ban and me noticing. So they couldn't

00:04:33 do anything about it. So I was like half laughing and half like, you gotta be kidding me about this.
00:04:33 do anything about it. So I was like half laughing and half like, you got to be kidding me about this.

00:04:39 and I posted on my blog about this and you guys picked it up. on Python bites,

Expand Down Expand Up @@ -192,7 +192,7 @@

00:07:48 I'm going to bleep that part. Every time the word pandas is said, we're bleeping it out on

00:07:51 the YouTube version. Well, this could be entertaining then. Wow. Reuben was really
00:07:51 the YouTube version. Well, this could be entertaining then. Wow. Reuven was really

00:07:57 testy. Like all those bleeps. No, seriously though. You know, let's, let's catch up. We'll

Expand Down Expand Up @@ -228,7 +228,7 @@

00:09:11 for example, and they had this short, cute article about the number of animals that go

00:09:16 through Heathrow airport every year. I was like, wait, there's gotta be a dataset for that. And
00:09:16 through Heathrow airport every year. I was like, wait, there's got to be a dataset for that. And

00:09:21 sure enough, the Heathrow airport authority publishes a dataset in CSV of how many animals

Expand Down Expand Up @@ -350,7 +350,7 @@

00:13:34 learned, like some of the idioms from Python are not appropriate. So I was giving a class in like

00:13:39 optimizing pandas, like a short class, we'll call it microclass, like 90 minutes long,
00:13:39 optimizing pandas, like a short class, we'll call it micro class, like 90 minutes long,

00:13:43 about a year or so ago. And at the end, I was like, oh, and by the way, obviously just never do for loops. And everyone's like, wait, wait, wait, what?

Expand Down Expand Up @@ -396,7 +396,7 @@

00:15:28 has its own idiomatic style that is different than what you would call Pythonic, right? Like

00:15:34 it's Pandonic. I don't know what the name is, but idiomatic pandas, right? Where there's things that
00:15:34 it's Pydantic. I don't know what the name is, but idiomatic pandas, right? Where there's things that

00:15:40 are specific to pandas, like this vectorization stuff, right? Instead of looping over, right?

Expand Down Expand Up @@ -450,7 +450,7 @@

00:17:51 I initialized the logger with the string info for the level rather than the enumeration dot info,

00:17:58 which was an integer-based enum. So the logging statement would crash, saying that I could not
00:17:58 which was an integer-based Enum. So the logging statement would crash, saying that I could not

00:18:04 use less than or equal to between strings and ints. Crazy town. But with Sentry, I captured it,

Expand Down Expand Up @@ -522,9 +522,9 @@

00:20:52 vast. Yeah. Or pandas too comes out or something like that. Yes. Yes, indeed. I mean, I've been

00:20:57 exploring, I mean tomorrow, tomorrow I head off to Prague for EuroPython, where I'm giving a talk
00:20:57 exploring, I mean tomorrow, tomorrow I head off to Prague for Euro Python, where I'm giving a talk

00:21:02 on a pyarrow in pandas. And so I've been looking into that a lot and oh boy, right. I mean, I've
00:21:02 on a Pyarrow in pandas. And so I've been looking into that a lot and oh boy, right. I mean, I've

00:21:08 been using it for say a year or so, but it's amazing. And yet there are all these subtle

Expand Down Expand Up @@ -690,7 +690,7 @@

00:27:48 to like multi-step it. And I would just love to see more of it, but let's talk.

00:27:51 Well, I'll just, I'll just say there on that front. So CanDoes like does have the option to
00:27:51 Well, I'll just, I'll just say there on that front. So Condos like does have the option to

00:27:58 either get back a new data frame or to say in place equals true. And then it does it locally,

Expand Down Expand Up @@ -930,7 +930,7 @@

00:37:37 you know, send taxis at different places. - Sure, have a special program for long distance

00:37:41 stuff or whatever. Yeah. - Right. Right. Or if you're Uber, you know where to place, they actually used to have the geog, the longitude and latitude of where
00:37:41 stuff or whatever. Yeah. - Right. Right. Or if you're Uber, you know where to place, they actually used to have the geography, the longitude and latitude of where

00:37:48 people were picked up and dropped off and they got rid of that. And I'm sure both for privacy

Expand Down Expand Up @@ -1054,7 +1054,7 @@

00:42:52 Precisely. Precisely. And so another nice way to do this also is not just read this one and read

00:43:00 that one, but you can use a list comprehension with something like glob. So glob.glob on star.csv,
00:43:00 that one, but you can use a list comprehension with something like glob. So glob. Glob on star.csv,

00:43:06 get back a list of data frames and then just hand that to pd.concat. And so that's where

Expand Down Expand Up @@ -1090,7 +1090,7 @@

00:44:27 I don't think that like they need to learn that. So and like a lot of the standard library there,

00:44:31 it's hard to say. Right. So as I said, I love glob, right? Globbing is fantastic.
00:44:31 it's hard to say. Right. So as I said, I love glob, right? Globing is fantastic.

00:44:36 But that's definitely not in like my intro class. I would say, oh, by the way. Yeah. I would bet

Expand Down Expand Up @@ -1198,7 +1198,7 @@

00:48:51 I read this fantastic book a few years ago called Cork Dork by this journalist who decided to become

00:48:57 a Somalier and she took the exam and her journey toward there, she convinced me these words actually
00:48:57 a Sommelier and she took the exam and her journey toward there, she convinced me these words actually

00:49:03 have real meaning and people are very serious about it. So I will not roll my eyes quite as

Expand Down Expand Up @@ -1228,7 +1228,7 @@

00:49:55 break that into a list. But now what? Now I have a series of lists. Now what do I do?

00:49:59 And so one of the key methods to know here is something called explode. And explode is
00:49:59 And so one of the key methods to know here is something called Explode. And Explode is

00:50:05 let's take a series of lists and turn that into a very, very, very long series. And so basically

Expand Down Expand Up @@ -1422,7 +1422,7 @@

00:57:55 have more big cities than I realized? And you know, where's New York and New Jersey? Like it's

00:58:00 way down the line. You think of those as having like pretty megatropolis type places. Massachusetts.
00:58:00 way down the line. You think of those as having like pretty metropolis type places. Massachusetts.

00:58:06 That's right. That's right. But it's how many cities, right? So, right, right, right. That's

Expand Down Expand Up @@ -1573,4 +1573,3 @@
01:03:47 host, Michael Kennedy. Thanks so much for listening. I really appreciate it. Now get out there and

01:03:51 write some Python code.