Latest / Talk Python To Me / #90: Data Wrangling with Python
Transcript
- 0:00Do you have a dirty, messy data problem?
- 0:01Whether you work as a software developer or as a data scientist,
- 0:04you've surely run across data that is malformed, incomplete, or maybe even wrong.
- 0:09Don't let messy data wreck your apps or generate wrong results.
- 0:12What should you do?
- 0:13Listen to this episode of Talk Python To Me with Catherine Jarmul
- 0:17about the book she co-authored called Data Wrangling in Python
- 0:19and her PyCon UK presentation entitled
- 0:22How to Automate Your Data Cleanup with Python.
- 0:25This is Talk Python To Me, recorded November 28, 2016.
- 0:29Welcome to Talk Python To Me, a weekly podcast on Python,
- 0:57the language, the libraries, the ecosystem, and the personalities.
- 1:00This is your host, Michael Kennedy.
- 1:03Follow me on Twitter where I'm @mkennedy.
- 1:05Keep up with the show and listen to past episodes at talkpython.fm
- 1:08and follow the show on Twitter via at Talk Python.
- 1:11This episode has been sponsored by Rollbar and GoCD.
- 1:15Thank them both for supporting the podcast
- 1:18by checking out what they're offering during their segments.
- 1:21Catherine, welcome to Talk Python.
- 1:24Thanks.
- 1:25I'm really excited to wrangle some data together.
- 1:28It's going to be fun.
- 1:28Yeah, it sounds good.
- 1:30I've seen some of your talks and, you know, look through your book
- 1:32and you're doing really cool stuff with data, data cleansing, data processing, data pipelines.
- 1:38And so I'm really looking forward to getting into those topics and sharing them with everybody.
- 1:43But before we do, let's start at the beginning.
- 1:45What's your story?
- 1:46How do you get into programming in Python?
- 1:48Yeah, so I kind of have a varied history with programming.
- 1:51I started doing programming in high school where I learned C++ as part of my AP computer science.
- 1:58And then I went to school and I was attempting to get my degree in computer science.
- 2:05And although I really loved my maths courses, I was pretty secluded in my computer programming courses.
- 2:13And I attribute this to the fact that I wasn't that into gaming.
- 2:16And I was one of about three women out of an incoming freshman class of over 300.
- 2:24I totally know where you're coming from.
- 2:26It seems like young guys that are into programming, so many of them come from the gaming world.
- 2:31That's why they got into programming is because they're so excited about games.
- 2:34Do you feel like that you felt like that kind of left you excluded from the social circles a little bit
- 2:39just because you didn't want to go hang out and play games and eat pizza at two in the morning?
- 2:43Yeah, it was definitely.
- 2:45I mean, this was a bit of a different era.
- 2:47I'm happy to hear it's a bit different now, but this was definitely like LAN parties and EverQuest.
- 2:53And I just didn't connect with that very well.
- 2:56So I didn't find a lot of people that wanted to work on projects with me or, you know, socialize
- 3:02with me outside of class, maybe about math things rather than about computer things.
- 3:06And for that reason, I kind of gravitated into economics and statistics and political science.
- 3:12And I kind of ended up doing statistics with soft sciences, if you will.
- 3:16Sure.
- 3:17And that's kind of the nudge that sent you down this data science path a little bit, huh?
- 3:21Yeah, yeah.
- 3:22I ended up eventually getting into journalism from that.
- 3:25And I ended up at the Washington Post and was that's where I met Jackie Kazel, my co-author
- 3:30for the book.
- 3:31And I learned Python there.
- 3:33And that was really fun.
- 3:34Oh, nice.
- 3:35What kind of work were you doing there?
- 3:36So the Washington Post was initially, and I don't know if it still is, one of the largest
- 3:41Django installs in the world.
- 3:43And we had built up a big app stack where we did the elections and numerous, all of the
- 3:52data pieces were built on top of Django with quite a lot of Python in the background doing
- 3:57the data wrangling.
- 3:58So that was kind of my first exposure to data wrangling, if you will, with Python.
- 4:02Yeah, that sounds really cool.
- 4:04And there's actually a lot of data science and interesting things going on in this data
- 4:10journalism space, right?
- 4:12That's a pretty big growing area, isn't it?
- 4:13Yeah, it's really neat to...
- 4:15I'm still in touch with some folks that are still in journalism.
- 4:18And I meet new people all the time because I'm involved in PyData Berlin.
- 4:23And so for those reasons, I'm constantly impressed and seeing new things that journalists are doing
- 4:29with data.
- 4:29And if any time, now is the time to do really good data journalism, in my opinion.
- 4:36Yeah, it's definitely a good time.
- 4:38And it's also a time where a lot of...
- 4:40It's very challenging, right?
- 4:42I just did a show with Jonathan Morgan from Partially Derivative about the top 10 data science
- 4:47stories of 2016 that's coming out at the end of the year.
- 4:49And I'm saving it for the end of the year because that seems like that's the time you do a look
- 4:53back episode.
- 4:54But a lot of the themes were about how data science and sort of the pollsters and so on
- 5:00didn't really get things right this year.
- 5:04And I think it's both an interesting time and a challenging time.
- 5:07It's pretty difficult with statistics to predict something like human behavior sometimes.
- 5:12So math can only do so much for you when you have some unpredictability, if you will.
- 5:19Yeah, absolutely.
- 5:19Absolutely.
- 5:20All right.
- 5:21Well, we have a bunch of stuff to talk about.
- 5:23So we're going to kind of skip around a little bit.
- 5:26But let's start with your book.
- 5:28Tell us, what's the title?
- 5:29Where did you get the idea to write it in the first place?
- 5:31Yeah.
- 5:31So the title is Data Wrangling with Python.
- 5:34And it was a kind of project of love between Jackie Kazel and I.
- 5:41Again, we had worked together initially at The Post back in 2008.
- 5:46And she actually first pitched the book to O'Reilly.
- 5:50And she was working on it.
- 5:52And she decided, you know what, this would be a lot better if I had a co-author.
- 5:56And so she called me up.
- 5:58I was in Berlin.
- 5:59And I said, sure, that sounds great.
- 6:01I would love to help.
- 6:02That's really cool.
- 6:02So the idea is, it's really for people who are not super seasoned Python programmers, but they're just getting into this whole data wrangling world.
- 6:12And it sort of introduces them to Python a little bit and hits all the major problems or types of things you want to do getting started, right?
- 6:21Yeah.
- 6:21So our initial idea was, this is for beginners.
- 6:24This is for someone that may or may not even know where their command line prompt is.
- 6:29And we're going to take them through the steps.
- 6:31And this is to make data wrangling more accessible to people that might not have a computer science background.
- 6:39And that kind of is a passion of mine and also of Jackie's, being that we both were involved in PyLadies chapters.
- 6:47And for that, yeah, we want an easy, accessible way to get involved working with Python, working with data.
- 6:55And this was our idea, our product of that.
- 6:58Yeah, I feel like, depending on your background, you sympathize more with people who you know are going to struggle, right?
- 7:06Like, I learned programming in college, not when I was really young.
- 7:11And so I still remember not getting my C libraries to link correctly and all the pain of what it is to be a new programmer.
- 7:19So I feel like, you know, it sounds like you have some of those experiences as well.
- 7:23And that probably comes through in the book.
- 7:25Yeah, I think, you know, there's a lot of ways that even just as we get more advanced as developers and programmers or engineers,
- 7:33whatever you think of yourself as, that you start using a lot of jargon and you start, you know, thinking in these bigger pictures.
- 7:40And sometimes it's good to remind yourself, you know, there's probably an easier way to explain this.
- 7:47There's probably a way to make this slightly more accessible.
- 7:49And I feel like that's a really big, important step towards making beginners feel like they can be a part of the community.
- 7:57Yeah, absolutely.
- 7:58I mean, there's certainly times when having high level conversations that maybe depend on terminology out of design patterns or some common library that you all know or something like that.
- 8:08It's important because you want to be efficient and get stuff done, right, as experts.
- 8:12But when you're presenting or when you're writing books, sometimes this perspective is really, really cool.
- 8:17So some of the things you talked about in there were basically just, you know, how do you get data loaded up?
- 8:24And there were three major areas where this data comes from.
- 8:28One of them was CSV and JSON, basically text files, right?
- 8:31Yeah.
- 8:32So this is particularly from a journalism perspective and also from just data that I see at companies.
- 8:38This is a big way that people handle data, even just, yeah, plain text files, if you will.
- 8:45Yeah, absolutely.
- 8:45And so how often did you hear from people that were like trying to parse CSV files directly or JSON files directly rather than using the built-in modules?
- 8:55I'm not quite sure.
- 8:56I do think that there's a lot of people that just try to do that directly in the files or directly in a program like Excel.
- 9:04And so this is kind of taking them out of the pre-programmed programs to actually get started writing code and using Python to do it.
- 9:14Yeah, that's cool.
- 9:15Speaking of Excel, like that's got to be the world's biggest database, right?
- 9:20You know, there's so much data and data processing actually runs on Excel.
- 9:25Until you hit about.
- 9:26Yeah, yeah.
- 9:27Yeah.
- 9:28Until it just like, it just doesn't work anymore.
- 9:30Like, I don't think people leave Excel very willingly.
- 9:33It's like, we have to find a different answer.
- 9:36Yeah.
- 9:37Yeah, that and I've found, you know, quite a lot of resistance to learning programming for people that are really adept at SQL.
- 9:44They kind of stay in this databasing world where everything is a SQL query.
- 9:49And every report can be made with a really, really complex 40 line SQL query.
- 9:55And I have a lot of respect for that.
- 9:57But maybe it's a little bit easier to let a programming language do some of the heavy lifting for you.
- 10:03Sure.
- 10:04I mean, SQL is great for declarative stuff.
- 10:06But sometimes you want an imperative type of problem solving and with a little declarative mixed in or who knows, right?
- 10:14Another area that you said you really liked were PDFs, right?
- 10:19Oh, yeah.
- 10:20Yeah, PDFs are amazing.
- 10:23Amazingly painful, right?
- 10:26Yeah, exactly.
- 10:27Indeed, a very large pain point.
- 10:30And I still find that there's so many different NGOs and other governmental organizations that release all of their data in a yearly report in PDF form.
- 10:42Yeah.
- 10:42And, you know, to some degree, that's fine if it's meant for like reading.
- 10:46But there should be a, and here's the actual JSON version or something, right?
- 10:51And that probably is missing.
- 10:52Yeah.
- 10:52And, you know, the biggest thing that we encourage folks to do in the book is actually just pick up the phone and call the agency or the NGO or whomever it is and ask, hey, do you happen to have this in any other format?
- 11:05Because PDFs are really painful.
- 11:07There's not a lot of fun.
- 11:09And you end up doing quite a lot of post-processing.
- 11:12Can you do it, though, like from Python?
- 11:13If you've got like tables and a PDF, can you get in there and get it out with Python?
- 11:17Yeah.
- 11:17So we ran into this issue with the book because it was actually quite difficult to get at some of the tabular data.
- 11:22And I came across an old kind of forgotten library called PDF tables.
- 11:28At the time, it wasn't Python 3 compliant.
- 11:31So we needed to do it all in Python 2.
- 11:34But now I went to EuroPython and I was talking about this problem.
- 11:39And there was a guy there.
- 11:42I forget his name right now.
- 11:43But he converted it to Python 3.
- 11:46So now it's, I believe, compatible with 3.4.
- 11:48And you can just simply use a few commands.
- 11:53The documentation is not very well made.
- 11:55But you can use a few commands and you can parse out actual tabular data.
- 11:59And it does it quite well.
- 12:00That's really excellent.
- 12:01I think that's an interesting story and that happens all the time, right?
- 12:06Like there are so many packages and this functionality is spread across so many different places, right?
- 12:13I mean, Python is great because you can pip install anything, right?
- 12:16Pip install, you know, import anti-gravity sort of thing, right?
- 12:20Yeah.
- 12:20Which is great.
- 12:21But when you're newer, how do you know where to find these things?
- 12:25So I think when you get a chance to share these cool libraries that you found that solve problems, I think that's great.
- 12:30And we'll do some more of that later, actually, from your talk.
- 12:32Cool.
- 12:32Yeah, for sure.
- 12:33So that's sort of the data acquisition stuff.
- 12:36And then you talk a little bit about storing and presenting data.
- 12:40You want to talk about that?
- 12:40Yeah.
- 12:41So I gave people basically an introduction to databasing and kind of went over with them.
- 12:48Okay.
- 12:48Here's how you might use relational or non-relational databases.
- 12:52And here's a little bit of the pros and cons of each.
- 12:55It's kind of difficult to make that extremely accessible to beginners.
- 12:58But I feel like it's a good problem to start to introduce them to, that there's quite a lot of different ways to store data.
- 13:06And you should start thinking now about what makes the most sense for your project or for your team.
- 13:13And that's a problem that we face every day, you know, as data people, when we're deciding how to construct something new or we're deciding, okay, how should we build this workflow?
- 13:24We constantly have to think, okay, what's going to be, you know, do we need it in high availability storage, so to speak?
- 13:30Or do we need it maybe stored away somewhere in a file on somebody's computer?
- 13:34Right.
- 13:34Are you going to do aggregation or MapReduce type stuff to it?
- 13:38Are you going to do joins?
- 13:40Like, there's just a lot to consider.
- 13:41And when you're new, of course, that's extra hard, right?
- 13:44Yeah.
- 13:45You don't even know what a join is.
- 13:46Like, how do you, like, evaluate whether you need one?
- 13:49It's even something that we, as more seasoned people, forget sometimes.
- 13:52I mean, sometimes I'm doing some speed comparisons of something, and I just change the format to maybe one that's more preferable to that particular library or tool.
- 14:02And, oh, yeah, that speeded it up five times.
- 14:05I don't even have to optimize code because I chose a different format to read the data from.
- 14:10Yeah, it's really amazing.
- 14:12So then another area that you talk about is web scraping.
- 14:17And I think web scraping is pretty cool.
- 14:19Web scraping and APIs kind of go together, right?
- 14:21Like, there's so much data out there.
- 14:23You just got to go get it.
- 14:25Yeah, and I feel like that is really empowering first step when you're beginning is, oh, yeah, I scraped, you know, my favorite website or whatever it is.
- 14:34I feel like that can be a really empowering first step.
- 14:37And it doesn't take that much Python code.
- 14:40I used in the book, I used some scrapey, which is about my favorite library for doing web scraping and web crawling.
- 14:47Yeah, scraping is cool.
- 14:48Oh, I had Pablo on the show a while ago.
- 14:51And his story with scrapey is really cool.
- 14:52Oh, that's awesome.
- 14:53I'll have to check it out.
- 14:55They're a really great team.
- 14:56I had a chance to meet them out of PyCon a while ago.
- 14:59And they're just really awesome, inspiring, you know, fully remote team.
- 15:03So how much do you have to be careful about usage rights or restrictions on websites if you're looking at data for, like, internal use?
- 15:13You know, this is just something that's coming to mind as I'm thinking about web scraping.
- 15:17Like, if you want to answer a question for your company, how open is the web for you?
- 15:21Do you know?
- 15:22I feel like I go over quite a lot in the book.
- 15:26And also, you know, whenever I give talks on web scraping, that you need to look at the terms of service of the website.
- 15:33You need to look at the robots.txt file.
- 15:36You should be a conscientious scraper.
- 15:39These are important things to think about.
- 15:41Clearly, there's been times where I've found APIs that are undocumented.
- 15:45And I've reached out and sometimes they're like, no, don't use that.
- 15:48We didn't know it was out there.
- 15:49And other times they're like, oh, yeah, fine.
- 15:51We don't have documentation for it, but you can go ahead.
- 15:54So I think that's, you know, that's the best practices.
- 15:57I know quite a few people that don't follow those.
- 16:00But I do think it's really important to be a conscientious scraper.
- 16:04And there are, of course, media laws around that.
- 16:08And so you don't want to find yourself on the wrong end of a lawsuit because you were a little bit too lazy to read the terms of service.
- 16:15Yeah, absolutely.
- 16:16I feel like those kinds of challenges are really hard because it's not just knowing the laws of your country.
- 16:23Right.
- 16:23I mean, it's all the countries.
- 16:26You might be interacting with many of them.
- 16:28Right.
- 16:28And so it's extra hard.
- 16:30And, you know, Europe has different privacy rules than the U.S.
- 16:33And it's a bit of a bit of a Wild West.
- 16:36Yeah, it's definitely, you know, there's obviously no international regulation of this at any point in time.
- 16:42And I don't even think international regulation would work properly for this.
- 16:47But I do think it's a matter of being kind of an ethical person and saying, okay, am I doing this in an unethical way?
- 16:58Probably try and avoid it.
- 17:02It seems like a good rule to live your life by, really.
- 17:04I mean, especially if you're going to go write an article, right, if you're doing this for like data journalism sort of thing.
- 17:10Yeah, clearly.
- 17:11And a lot of times, honestly, if you pick up the phone and you call people or you write an email, people are more than willing to help share the data with you.
- 17:20And I feel like we're kind of in an era of open data everywhere, open APIs everywhere.
- 17:25And so I think people are very responsive to that.
- 17:27Yeah, totally agree.
- 17:29So the last thing that I want to talk about that you cover in your book before we get to your cleaning data story is about automation and scaling.
- 17:37What do you guys do with regard to that?
- 17:39So I think that we just give a little bit of a taste of that.
- 17:43And this is this idea, automate the...
- 17:46Automate the boring stuff with elsewhere.
- 17:47Yes, yes.
- 17:48Sorry.
- 17:48That's a great one.
- 17:49Yeah.
- 17:49And I think that this is a really important skill as a beginner that is just like, wow, that's magical.
- 17:55I can just have something run and it runs either via Cron or it runs as a salary task or however it runs.
- 18:03And wow, it just did it on its own.
- 18:06I think as a beginner, that's a really exciting moment of just like, oh, my program's alive.
- 18:13So...
- 18:14Yeah, if you can take something that...
- 18:15Yeah, yeah, that's awesome.
- 18:16And if you could take something that's like four hours you had to do at the end of the week that's super painful and repetitive and make it a button press and remove all the human error.
- 18:26Like, that's magical.
- 18:27Yeah, and I think it's really, you know, it's something that people can give back quickly to their team.
- 18:33So if you're just on the side like, okay, I'm going to learn Python.
- 18:36I want to do this one report I do every week in Excel.
- 18:40I want to do it on my own.
- 18:41And then, yeah, you're right.
- 18:43Like, they can use Flask or Django or something and turn it into a one-click button.
- 18:47That's, you know, they're the hero for the next year or so.
- 18:51Your book seems really interesting.
- 18:53And if you're just getting into Python from this data angle, it's definitely worth checking out.
- 18:57Yeah, thanks.
- 18:59Yeah, you bet.
- 18:59So let's move on to something that you did.
- 19:03Was that this summer?
- 19:04Fall?
- 19:04It was this fall, right?
- 19:05Like September, right?
- 19:06The PyCon UK?
- 19:07Yeah, yeah.
- 19:08So this is a bit, my PyCon UK talk was based a little bit off of my initial talk on this topic, which was at PyData Berlin last year.
- 19:17All right.
- 19:17So at PyCon UK 2016, you gave a talk called Cleaning Data, something that, what was the title exactly?
- 19:25I don't think I have it written down here.
- 19:26I believe it was Automate Your Data Cleanup with Python.
- 19:29I think it was really interesting.
- 19:31Like, you really laid out some of the places that we get data from.
- 19:35And then you gave a bunch of libraries and techniques to fix it.
- 19:39And that's what I found really interesting is I feel like if any of these problems that we're going to talk about line up with a problem you have, it's like, and here's the solution, which is super cool.
- 19:49Yeah.
- 19:49And even if it doesn't quite fix your problem, looking through sometimes the source code and how people are approaching it can give you new ideas about how to fix it for your own particular problem set.
- 20:00Yeah.
- 20:00So you kind of set the stage.
- 20:01Let me read a little quote from one of your slides.
- 20:03There was a paper or an article or something called Towards Reliable Interactive Data Cleaning.
- 20:08And you said something to the fact, or the quote said something like, such approaches require a clear definition of dirty data that is independent of downstream analysis.
- 20:18Even worse, one consultant noted that errors might be found after some result is reported.
- 20:26That's a really big problem, right?
- 20:27Like understanding, even knowing whether you have good data or not, right?
- 20:31Yeah, I feel like this is a massive problem and a problem that we see often.
- 20:36One thing I'm pretty passionate about that a lot of people don't do is even just data unit testing.
- 20:42So we have these unit tests for nearly everything.
- 20:45And then we don't test, you know, what happens if we get a really odd piece of data or something that doesn't fit.
- 20:52And if it just goes to the pipeline and then it's reported, this can take, you know, a few analysts down the line before somebody's like, wait, we had negative sales in January.
- 21:01What does that even mean?
- 21:03That's right.
- 21:06That's the pit in your stomach that forms when you realize what has happened, because it's not just like a bug in some code that like, well, this website renders a little weird or doesn't scale so well.
- 21:18It's like decisions could have been made, right?
- 21:22Yeah, or maybe already have been.
- 21:24Yeah, you have been made based on this data.
- 21:26We decided to buy this company or not as an acquisition because of your report.
- 21:31We decided to pursue this product line and not that one on your report or whatever, right?
- 21:37You know, killed a product based on your report that was not quite accurate.
- 21:41So, yeah.
- 21:42Or, you know, yeah, like kind of this goes back to what we were initially talking about, about statistics being off about the election.
- 21:48You know, it's a little bit of knowing your inputs and your outputs and being cognizant that you need to actually test for some of those things or at least have safety checks along the way.
- 21:59Yeah, absolutely.
- 22:00And so you brought up data unit testing, which was one of your recommendations, let's say, during the talk.
- 22:06And you talked about hypothesis, right?
- 22:09Oh, I'm a big fan of hypothesis.
- 22:11It's really amazing work by David McEver.
- 22:14And, yeah, I highly recommend if you haven't looked at it to take a look at it.
- 22:19It's based off of Haskell's QuickCheck.
- 22:21And it's this idea of deterministic testing.
- 22:25It's really, really fun.
- 22:26Yeah, I'm really impressed with it as well.
- 22:28I didn't know about it until six months ago or something like this.
- 22:33And then I learned, wow, this is really nice.
- 22:36So, yeah, I actually had David on episode 67 if people want to learn more.
- 22:41But the idea is you're going to do some kind of test.
- 22:44And I guess the terminology we were coming up with was the type of test that you think of when you write unit tests are example-based unit tests or something like this, where you say, if I put in a five here and this customer that has registered equals true on them and I call this function, then this thing happens.
- 23:05I'm going to do some kind of test.
- 23:06And that's not really how Python hypothesis works.
- 23:08And that's not really how Python hypothesis works.
- 23:09It's more like there's an input that's the number.
- 23:12There's an input that's a customer.
- 23:13And you can let the framework change all the values.
- 23:16And then you just make assertions.
- 23:18Inputs like this should lead to outputs like that.
- 23:21And it's really cool, I think.
- 23:23Yeah, it's the idea of property-based testing.
- 23:25So you're essentially saying like, okay, this accepts a list of floats.
- 23:29And it should return a valid float that's greater than two.
- 23:33And when that fails, then you know you have these edge cases.
- 23:38And the fun thing is sometimes you just come up on the edge cases of whatever tool you're using or even the edge cases if you're using Python 2 of floats.
- 23:47And that's fine.
- 23:49But it's good to first understand, okay, what are the possible inputs?
- 23:54And what do I expect the output to be?
- 23:56And this helps determine in your workflow or in your data science that you're doing that you actually know what you're seeing coming in and that you actually know what you should be producing.
- 24:07Yeah, absolutely.
- 24:08And it both has the happy path and the edge cases where so many of the bugs and errors live.
- 24:15Yeah.
- 24:17Yeah.
- 24:17So whether that's bugs in data or bugs in just pure algorithms, right, it's really important.
- 24:22So I definitely second your recommendation hypothesis.
- 24:25That's cool.
- 24:26So we talked about having this bad data and not even really knowing.
- 24:31I mean, having your report or your pipeline or whatever it is you're working on to process this data run to completion is not really enough, is it?
- 24:41The problem is, is that just running something to completion, like you said, or just assuming that because there's new data in my database, that that means that everything has processed correctly is always a false assumption.
- 24:54And sometimes you're correct in that.
- 24:55And other times you didn't have the right checks.
- 24:59And it's impossible to write perfect code, right?
- 25:02We know this as engineers, as data people, that there's going to be bugs in our programming.
- 25:09And because of that, we need to have, you know, real eyes on the problem.
- 25:15And this is interesting.
- 25:16This is interesting.
- 25:16This is some of the things that I was looking at when I was doing research for this talk, is that within the academic field, they're actually determining ways to have the data cleanup process report.
- 25:29Hey, I'm not quite sure about this one because it seems either like an outlier or the probability that it's correct based on the algorithm I used is very low.
- 25:40And then actually taking that data and presenting it to the user again, you know, the next day or once a week and having the user actually confirm yes or no, whether the cleanup operated correctly.
- 25:52And I think that this is, you know, an important lesson to learn from where academics are coming from it.
- 25:57And also a way that we can help automation actually be a solution where we have buy-in from everyone, right?
- 26:04Yeah, that's really cool.
- 26:05And basically you take the least trusted data and you say, okay, based on your algorithm, like this, this, I'm really not so sure about the other ones that were cool.
- 26:14And you can just show that to the user, right?
- 26:16So you also had some, some other interesting stuff from academics as well.
- 26:34This portion of TalkPyPyPundMe has been brought to you by Rollbar.
- 26:38One of the frustrating things about being a developer is dealing with errors, relying on users to report errors, digging through log files, trying to debug issues, or a million alerts just flooding your inbox and ruining your day.
- 26:50With Rollbar's full stack error monitoring, you'll get the context, insights, and control that you need to find and fix bugs faster.
- 26:58It's easy to install.
- 26:59You can start tracking production errors and deployments in eight minutes or even less.
- 27:03Rollbar works with all the major languages and frameworks, including the Python ones, such as Django, Flask, Pyramid, as well as Ruby, JavaScript, Node, iOS, and Android.
- 27:12You could integrate Rollbar into your existing workflow, send error alerts to Slack or HipChat, or even automatically create issues in Jira, Pivotal Tracker, and a whole bunch more.
- 27:22Rollbar has put together a special offer for Talk Python To Me listeners.
- 27:25Visit rollbar.com slash Talk Python To Me, sign up, and get the bootstrap plan free for 90 days.
- 27:31That's 300,000 errors tracked, all for free.
- 27:34But hey, just between you and me, I really hope you don't encounter that many errors.
- 27:37Love to buy developers at awesome companies like Heroku, Twilio, Kayak, Instacart, Zendesk, Twitch, and more.
- 27:43Give Rollbar a try today.
- 27:45Go to rollbar.com slash Talk Python To Me.
- 27:48One of the parts of that talk, or the second half of that talk, I guess, that I thought was really interesting
- 28:01was the sort of catalog of libraries or Python packages that you could use for solving various problems
- 28:10that were reworking your data into a way that's going to be much more useful to you.
- 28:16So let's take a moment and kind of go through those and tell people about them because I think they're really useful.
- 28:22And the first one that you mentioned was about if you have some kind of duplication.
- 28:29It's called D-dupe.
- 28:30Yeah, and that along with Probable People and U.S. Address,
- 28:37they're all from this company called DataMade that works with journalists really to tell good data stories.
- 28:43I believe they're based in Chicago.
- 28:45I'm not quite sure.
- 28:46But they have a few good talks on this.
- 28:49And so they have D-dupe, which essentially, you know, kind of can go through your tabular data and say,
- 28:54hey, these two rows look quite similar.
- 28:57Are they actually the same data?
- 28:59And they use a mixture of fuzzy matching and I believe stringetic distance to determine,
- 29:07okay, this Bob Dole and Robert Dole are the same person.
- 29:11And that's a really great one.
- 29:14They also have used some of their same techniques to determine probable people,
- 29:19which is their other library, which tries to essentially parse people names and determine this is the first name,
- 29:26this is the last name, this is the title,
- 29:28and U.S. Address, which they use to parse, you know, this is the street number, this is the city.
- 29:35And it's all based on a very, very simple neural network.
- 29:40And you can therefore train it on your own data.
- 29:43That's really great.
- 29:44Like probable people, you can give it like a first name, a middle name, like a nickname,
- 29:51last name, you know, junior, senior, whatever.
- 29:55And it can pull those out and say, well, here's actually the last name.
- 29:58Things like that, right?
- 29:59Yeah.
- 30:00So it's really great if you have, you know, survey data or other things that haven't been processed,
- 30:05which is most of the data that you have to do when you're dealing with just randomly generated data
- 30:12or randomly input data, then yeah, these are really great ways to kind of cut down on your time.
- 30:18You also mentioned some for string matching.
- 30:21One was called Jellyfish to do approximate and phonetic matching of strings.
- 30:27Yeah.
- 30:27So in this, you know, speech to text world, we all know that sometimes things go wrong.
- 30:33So if you have, you know, strings that you potentially need phonetic matches for,
- 30:40then Jellyfish is a great tool for that.
- 30:42And it can help you find kind of maybe some of the errors in this, you know, auto transcription
- 30:48or speech to text.
- 30:49Oh yeah.
- 30:50Very cool.
- 30:50What about Fuzzy Wuzzy?
- 30:52Fuzzy Wuzzy is one of my favorite libraries.
- 30:54You got to love it just for the name, right?
- 30:56Yeah.
- 30:57Right.
- 30:57And it allows you basically to, you know,
- 31:00take strings and do Levenstein distance between them.
- 31:05And this can help you either in like a token sort way.
- 31:09So if it doesn't matter the order of the words, just that the words are the same.
- 31:14And they use this a lot because they actually sell game tickets.
- 31:17So whether I say it's the Steelers versus the Patriots or the Patriots versus the Steelers,
- 31:23it's the same game that I'm likely talking about.
- 31:25And so they can do, you know, token sort matches and they can also just do partial ratio matches.
- 31:31And it's really useful if you just want a quick installation to work on string distance.
- 31:37Yeah.
- 31:38Yeah.
- 31:38That sounds great.
- 31:39The other one, the next one, rather, I really liked the name.
- 31:42There's a lot of great names in here.
- 31:44The next one is Scrub-A-Dub.
- 31:46Yeah.
- 31:47So Scrub-A-Dub is great if you've ever had to work with medical data or maybe even potentially
- 31:52customer data and you essentially need to privatize it before you do reporting.
- 31:56Scrub-A-Dub is going to try to go through, find these personally identifiable pieces of information
- 32:03and remove them or replace them with like UIDs or something like that.
- 32:08Yeah.
- 32:08That's really cool.
- 32:08You know, another area that comes to mind that that might be useful is developer data
- 32:14for like web applications and stuff.
- 32:16You want to take the data that drives your website, say, and you want to put it on the
- 32:22dev machines and staging machines and whatnot.
- 32:24But maybe it's got like e-commerce information in there and you want that gone.
- 32:28Right?
- 32:29Yeah.
- 32:29Like maybe you, like if the developer loses their laptop or it gets broken into, it's like,
- 32:33well, it's not really that important.
- 32:35That would be great to say.
- 32:37It doesn't happen very often, I think.
- 32:38Yeah.
- 32:39I mean, and there's quite a lot of tools too that you can use to generate, you know, fake
- 32:45data with that.
- 32:46I believe, I think one of them is called Faker.
- 32:49Yeah.
- 32:50Faker.
- 32:50You definitely mentioned Faker.
- 32:51Faker is cool.
- 32:53And it'll generate all sorts of interesting data.
- 32:56It'll do like addresses, right?
- 32:58Yeah.
- 32:58It can do addresses.
- 32:59It can do people.
- 33:00And then you can write your own methods and it will generate those.
- 33:03So, so you need to, I think it even actually has credit cards built in and other things
- 33:08like that.
- 33:08So.
- 33:09Oh, that's excellent.
- 33:10Yeah.
- 33:10Because one of the things that's challenging is it's harder than it sounds, I think, to
- 33:15generate real looking fake data for a unit test for web design.
- 33:20Like if I'm going to look at like a profile page, if it doesn't like have realistic looking
- 33:25data, well, maybe my design isn't really going to capture what it should.
- 33:29Yeah.
- 33:30And kind of goes back to what we were talking about with testing your pipeline.
- 33:33If you don't have realistic enough data, then everything can look fine until you throw actual
- 33:38data into it.
- 33:39Yeah.
- 33:40That's for sure.
- 33:41Yeah.
- 33:41And it's cool because it'll do addresses in different locales.
- 33:44You can say, give me a US address.
- 33:45Give me a German address.
- 33:47And of course, like the zip postal code comes in different orders and stuff like that.
- 33:51Yeah.
- 33:52Yeah.
- 33:52I definitely was impressed with that one.
- 33:53Another one that made me happy that you talked about was pint.
- 33:57Because who wouldn't want a pint?
- 33:58Actually, how big is a pint?
- 34:00I mean, that's like how, like, well, to say a liter.
- 34:03Like, I have no idea.
- 34:04My wife is German.
- 34:05She asks me these questions all the time.
- 34:06How many ounces in this thing?
- 34:07I have no idea.
- 34:08Like, ounces don't make any sense.
- 34:10Like, I just have to compute it.
- 34:13Right?
- 34:13And so pint kind of addresses this problem of conversions, right?
- 34:16Yeah.
- 34:16So, and it does it in really, really simple terminology.
- 34:20And for that reason, you can do things like multiply meters by centimeters or convert easily
- 34:27from feet.
- 34:28Yeah.
- 34:29That's a lifesaver when it comes to maybe you have an international application.
- 34:33We don't really have a good way of internationalizing units built into Python.
- 34:40And so for that reason, yeah, pint is a great tool.
- 34:42Yeah.
- 34:43Pint is really cool.
- 34:43And you can do, like you said, you can compute with the measurements within a particular scheme
- 34:49of measurement or convert between them.
- 34:52So, for example, you can say like three times unit registry dot meter plus four times unit
- 34:58registry dot centimeters.
- 34:59And it will compute that.
- 35:00Or you can say five times foot plus nine times inches.
- 35:03Now, tell me that in meters or something like this, right?
- 35:07Yeah.
- 35:07And that's just a lot of math that you don't have to do yourself and that you don't have
- 35:12to check yourself.
- 35:13Sure.
- 35:13And it sounds simple, right?
- 35:14Like, okay, well, there's, you know, like 3.31 feet per meter.
- 35:19So you divide like this.
- 35:20But we've had like billion dollar spacecraft like crash straight into the ground because
- 35:26somebody inverted that multiplication or something, right?
- 35:29Like they needed pint.
- 35:30Yeah.
- 35:32Not quite sure I'm going to challenge NASA or SpaceX, but sure.
- 35:36No, of course.
- 35:37But definitely these sorts of problems have vexed like really important projects.
- 35:41Yeah.
- 35:42And clearly, you know, again, if you have, you know, an international site or if you're
- 35:46dealing with data from numerous places and you want to make sure that it's correct, it's
- 35:51better to rely on another library that has its own set of unit tests, that has its own
- 35:56set of supporters and contributors and, you know, rely on the smarts of other people.
- 36:00Yeah, absolutely.
- 36:02Another thing that's really cool that I've talked about a little bit before on the show,
- 36:06I think it was on episode 77, was Arrow.
- 36:09And Arrow lets you deal with time in a much cleaner way, right?
- 36:14Arrow is super useful if you're, you don't want to sit there and determine, okay, this
- 36:21date is written in exactly this way.
- 36:23It has an auto-recognition, which can really help you if you're seeing data, date times in
- 36:29a few different syntaxes.
- 36:31And this is especially great for if you have like a distributed system and maybe half of
- 36:37your machines are set to report dates in one way and half of your machines are set in another
- 36:42way.
- 36:42You can still distribute the same code and it will actually function properly most of the
- 36:46time.
- 36:47Yeah, that's really cool.
- 36:48It definitely adjusts for the time time in a much nicer way than the built-in one, built-in
- 36:53date times.
- 36:54And also it has a nice humanized bit.
- 36:55So you can say like, given an arrow time, humanize this and say, well, that was about an hour
- 37:00ago.
- 37:00Yeah.
- 37:01Yeah.
- 37:02Which is great.
- 37:03So you don't have to write, you know, all of the math around those and use like five JavaScript
- 37:07libraries to have it written out to your users.
- 37:10Yeah.
- 37:11I've definitely, definitely written that code more than I need to write it in my life.
- 37:17So another one that you mentioned, just a shout out to it again, is PDF tables, PDF tables.6.
- 37:23That's really cool to go get the tabular data out of PDFs because, you know, who thinks it
- 37:29belongs in there?
- 37:29And nobody wants to look at the code underneath the hood there.
- 37:33So again, hat tip.
- 37:35Yeah, yeah, absolutely.
- 37:37And by the way, all of these packages we're talking about, there's links to every one of them
- 37:41in the show notes.
- 37:42So just go back and find them that way.
- 37:45Another one was called Data Cleaner.
- 37:47What's the story of Data Cleaner?
- 37:49The idea behind Data Cleaner is that it can automatically clean data for you.
- 37:54Now, that sounds a bit too good to be true.
- 37:59And it definitely depends on what you need to have cleaned and how you might need it cleaned.
- 38:04But I feel like this is starting to get on the edge of what my biggest excitement when
- 38:11researching this talk was, which is kind of the ways that academics are using machine learning
- 38:17to automatically clean and automatically edit dirty data, if you will.
- 38:22And I feel like we're definitely on the edge of this.
- 38:25I mean, machine learning is very sexy and has had quite, quite a lot of advances.
- 38:31And it's exciting to see it applied to something that is definitely unsexy, like data cleanup.
- 38:37Well, that's what we should use AI for, right?
- 38:40Yeah, right?
- 38:41I mean, nobody wants to sit around and do string matching on their own.
- 38:45Really, this is not a thing that any of us have a deep passion for.
- 38:50So the more that we can automate this away, the better our lives will be.
- 38:54The more time we can spend doing the fun stuff, like actual data analysis.
- 38:57Yeah, absolutely.
- 38:58Another one that you talked about was really cool, I thought, was about creating simple
- 39:03domain-specific languages, basically, or parsers that parse simple domain-specific languages
- 39:10called Parserator.
- 39:12Yeah, so this is, again, from the DataMade team.
- 39:15And this is kind of some of the back end that powers their U.S. addresses and their probable
- 39:21people.
- 39:21And you can essentially use it to find some different data structures.
- 39:25And depending on if you have data available that's labeled, you can train it.
- 39:31And I think that this is just a really great way that we can stop doing a lot of the difficult
- 39:38work.
- 39:38So this is the last time I want to see, you know, a 40-if-else statement line going through
- 39:45and testing, is it this, that, or the other, to, you know, parse a name or to parse an address.
- 39:50We can use machines to help us do this in far less code.
- 39:54This portion of Talk Python To Me is brought to you by GoCD from ThoughtWorks.
- 40:14GoCD is the on-premise, open-source, continuous delivery server.
- 40:18With GoCD's comprehensive pipeline and model, you can model complex workflows for multiple
- 40:24teams with ease.
- 40:25And GoCD's value stream map lets you track changes from commit to deployment at a glance.
- 40:31GoCD's real power is in the visibility it provides over your end-to-end workflow.
- 40:36You get complete control of and visibility into your deployments across multiple teams.
- 40:41Say goodbye to release day panic and hello to consistent, predictable deliveries.
- 40:46Commercial support and enterprise add-ons, including disaster recovery, are available.
- 40:50To learn more about GoCD, visit talkpython.fm/gocd for a free download.
- 40:56That's talkpython.fm/gocd.
- 41:00Check them out.
- 41:01It helps support the show.
- 41:09Another thing that you mentioned that I thought was interesting was DBpedia.
- 41:14What's DBpedia?
- 41:16DBpedia is a knowledge base based on Wikipedia.
- 41:20There's also Yago that's based off of Wikipedia.
- 41:23And it essentially is these, you know, knowledge base APIs.
- 41:27And you have to write Sparkle, which, yeah, takes a bit of getting used to.
- 41:33And for that reason, there's several ways that you can write this Sparkle using some Python helpers,
- 41:40including RDF Alchemy is a really popular one and Surf RDF.
- 41:45But basically, you can essentially get all of this data from this Wikipedia-based database.
- 41:52And this can be really essential in terms of cleaning your data, particularly when you get into natural language processing.
- 42:00And you want to say, okay, you know, I have William Clinton.
- 42:03Like, what does this mean?
- 42:05Who is this person?
- 42:06And you can essentially go query Wikipedia via DBpedia or via Yago.
- 42:11And it can tell you all of these different, okay, it's in topics, human people.
- 42:16It's in topics, U.S. presidents.
- 42:19And you can kind of get a lot of information from this that you wouldn't know just from saving the string and then having to have humans go through and annotate it.
- 42:29Okay.
- 42:29Yeah, that sounds really cool.
- 42:31I mean, to be able to harness Wikipedia in like a structured way is definitely more useful than trying to scrape it.
- 42:38Or I don't know how big the download of the data is.
- 42:40I know it used to be huge many years ago, so it's probably even huger.
- 42:44Yeah, it's pretty massive.
- 42:46And this is a great way that you can just use it like an API.
- 42:50Okay.
- 42:50Yeah, very cool.
- 42:51You know, another thing that you talked about that looks really useful and it's quite Pythonic in its style is this thing called OnGuard.
- 43:01And you can use it to come up with decorators to apply to your functions to verify stuff, right?
- 43:07Yeah.
- 43:07So OnGuard is specifically for pandas.
- 43:10And you can essentially decorate functions that, you know, essentially take in data frames and ensure that it has particular types or ensure that it's not empty.
- 43:22Things like that.
- 43:24And so this is essentially static typing for pandas, if you will.
- 43:28And I think that that's really great.
- 43:30I mean, I know that there's numerous opinions within the Python community about the need for something like static typing or type checking.
- 43:38But when you work with data, this is really important steps.
- 43:41And yeah, maybe you only want it to throw a warning, not an exception.
- 43:44But these are things that are important to building scripts, building pipelines that actually work.
- 43:51Yeah, absolutely.
- 43:52Because it's super easy for something that you thought had a number to have, quote, that number in it.
- 43:59And then math goes crazy, right?
- 44:02Yeah.
- 44:02And, you know, in pandas, there are certain things that are only available from particular d types.
- 44:07So, you know, given that everything is NumPy based in pandas, if you have an incorrect d type, it could just go through and, like, add all your strings together and give you, you know, a really awesome large number that has absolutely nothing to do with the math that you expected.
- 44:22Absolutely.
- 44:23I expected a number.
- 44:24I got a huge string that's full of numbers back.
- 44:26I don't know why.
- 44:27Exactly.
- 44:28Nice.
- 44:30All right.
- 44:30Well, I think that kind of wraps it up for the solutions, stating the problem, these little tools that you found to solve it.
- 44:37And I thought they were really cool.
- 44:38So hopefully people will find them interesting to know they exist as well.
- 44:41I hope so.
- 44:42And if people want to check out the talk, it's on the PyCon UK YouTube channel.
- 44:48Yeah, absolutely.
- 44:49And I'm definitely going to link to it in the show notes as well.
- 44:51So you can find it there on the page as well.
- 44:53And then speaking of videos, you actually took this idea of data wrangling and data pipelines and did a couple of cool O'Reilly videos as well, right?
- 45:04Yeah.
- 45:04So I have one O'Reilly video that's very focused on pandas.
- 45:08It's an introduction video to pandas.
- 45:10So it's meant for somebody that's trying to learn about pandas that hasn't done a lot in it yet.
- 45:16And it basically gives you an overview of these are the things that you can do with pandas.
- 45:21And we play around with some data in Jupyter notebooks and such.
- 45:25So it's a really great introduction if you've been meaning to check out pandas and you haven't.
- 45:30And then I also have a new one coming out on data pipelines or automation workflows, if you will.
- 45:37And this is going to cover things like Luigi and Airflow as well as Celery and kind of talk about how do you do distributed task processing and DAGs in Python.
- 45:49That sounds really cool, especially the second one.
- 45:51You know, I hadn't really heard of Airflow or Luigi.
- 45:55So I suspect many people listening probably haven't either.
- 45:58Maybe tell us what those are.
- 46:00Yeah.
- 46:01So Luigi is from Spotify.
- 46:03It's been out, I believe, for four or five years now.
- 46:06And Airflow is from Airbnb.
- 46:08And it's actually incubating as an Apache incubator project right now.
- 46:12And they're both really neat.
- 46:14They have a little bit of different approaches.
- 46:16But essentially, they're a way to build DAGs, which are directed acyclic graphs in Python, and to push all of your data through those graphs.
- 46:26So essentially, when you think about, let's think about a problem like MapReduce.
- 46:30We have a beginning, right, where we have all the data collected somewhere.
- 46:35Then we map the task.
- 46:36Then we shuffle and sort.
- 46:38And then we reduce.
- 46:39And finally, we have our output files.
- 46:43And when you think about that flow, you can see that it goes through a directed acyclic graph, right?
- 46:48It only moves one way.
- 46:50And it has only a particular set of nodes or edges that it will go through.
- 46:55And for that reason, you know, you can take this idea and apply it to quite a lot of workflow or data pipeline problems.
- 47:03And in the video series, I cover a few of those and how to parallelize them and how to work with them so that you get kind of an introduction to how to build these things and whether they're right for your tool set.
- 47:17Yeah, it sounds really cool.
- 47:18I feel like a lot of projects have these data pipelines and they're just hiding.
- 47:24They're not really brought out in a real clear way, you know?
- 47:27Yeah.
- 47:28I mean, there's definitely like quite a lot of scripting done in this instead of actually building a pipeline, right?
- 47:35So you have a script and it's calling, okay, when this finishes, then call this other function.
- 47:41What happens if it fails then?
- 47:43You know, you get an exception in your logs and you have to go through and say like, okay, do I start it again?
- 47:48Or where did it actually error?
- 47:50And having these instead as graphs, you can see exactly where they failed.
- 47:55And both Luigi and Airflow, as well as we know, Celery has ways to go and retry those based on the failure status.
- 48:03Yeah, absolutely.
- 48:04And once you understand them in this data pipeline way, distributing them so they run in parallel might be a really cool thing to do.
- 48:12There's a lot of stuff, right?
- 48:13Yeah.
- 48:14And I mean, this is just kind of, again, an introduction, but it's there, you know, it's to give you an idea of what's available and what people are using from a distributed scale.
- 48:24And then you can determine, okay, is this right for my project?
- 48:28Another thing that I covered in that, which is one of my favorite libraries to play around with, is Dask.
- 48:34And Dask is amazing.
- 48:36Basically, you can have parallelized DAGs directly on your local computer that is going through sometimes terabytes of data, just because it has the ability to parallelize it and to do out of core memory processes.
- 48:53That sounds really cool.
- 48:53I haven't played with Dask, but maybe I need to now.
- 48:56Yeah, yeah.
- 48:56And Matthew Rocklin is super smart.
- 49:00So, we'd love to hear him on the show sometime.
- 49:02Oh, that'd be great.
- 49:03Absolutely.
- 49:03Those videos sound really interesting.
- 49:05And people can definitely check them out if they're interested in it.
- 49:09Let's talk about a few other things you're up to because you're juggling many things, right?
- 49:13I like to keep busy.
- 49:14That's good.
- 49:17So, you were involved in the first Pi Ladies chapter in LA, right?
- 49:22I was lucky enough to be part of the original seven ladies that formed Pi Ladies in Los Angeles.
- 49:28And that was a really, really neat experience and very near and dear to my heart.
- 49:35Yeah, that's really great.
- 49:36You must be really proud to see how far it's coming.
- 49:39Yeah, it's kind of amazing to be at a conference somewhere in Europe and people will be like,
- 49:45Oh, yeah, I run Pi Ladies.
- 49:46I run Pi Ladies Prague.
- 49:48I run Pi Ladies Moscow.
- 49:50I run Pi Ladies wherever.
- 49:51That's just so inspiring.
- 49:53And I feel really, really great that the community has kind of just embraced it and ran with it.
- 49:59And I feel like that's really inspiring for young women that are getting into programming.
- 50:04Yeah, I think it's really great to have that support and just that whole structure.
- 50:09I think it's really important.
- 50:10And I think it makes a big difference in the Python community.
- 50:13As I look to other programming communities that don't have these things, they're definitely less well off for it.
- 50:21Yeah, I feel like there's a lot of communities that are now looking at Python as a really great example of how do you have a diverse community?
- 50:29And how do you have a supportive and open community?
- 50:33And that just feels really amazing to be part of a community that other languages are trying to replicate, if you will.
- 50:39Yeah, I'm sure.
- 50:40I'm sure.
- 50:41It's definitely, it feels like a better place to be, in my opinion.
- 50:44I love the Python community.
- 50:46And that's one of the reasons.
- 50:47So another thing, speaking of community, that you do is you help organize Pi Data in Berlin, right?
- 50:53Yeah.
- 50:54So I got asked to be a part of that at the conference last year.
- 50:58And it's a great group of folks.
- 51:01And we're constantly organizing the monthly meetups.
- 51:04Sometimes we have hackathons.
- 51:06And then we've already started organizing the conference for next year, which will probably be the first weekend of July.
- 51:13So if you want to come to Europe, you should do so the first weekend of July and come visit Pi Data Berlin.
- 51:19Yeah, I definitely recommend that.
- 51:22And maybe I'll make it.
- 51:23Who knows?
- 51:24It would be wonderful.
- 51:24Yeah, yeah.
- 51:25We're going to have a call for speakers pretty soon here.
- 51:28So.
- 51:28Okay, excellent.
- 51:29So I hear this a lot.
- 51:31And I know it means that you're really busy.
- 51:32But what does it mean to organize a conference, a Python conference?
- 51:36Yeah.
- 51:36So, I mean, right now it means quite a lot of emailing and telephoning with folks to find a good venue.
- 51:43We have a few keynote speakers that we're speaking with.
- 51:46And then we work, of course, with NumFocus, which is the overarching nonprofit organization based in the States.
- 51:54And they're the ones that are really kind of running the Pi Data behind the scenes and really helping organizers like us with the tools that we need to set up a good conference.
- 52:06Yeah, that's really cool.
- 52:07One of the things I think is great about Python is there's not just one big Pi Data conference somewhere in the world and you have to go to it.
- 52:15But they're in many places, right?
- 52:17And I think that makes it more accessible as well.
- 52:19Yeah, and it's really the support is there kind of with the same idea of, you know, having Pi Ladies chapters all over.
- 52:26The support is there within NumFocus to really say, okay, you know, we have your back and we're going to help you figure out how to get good speakers.
- 52:36We're going to help you figure out a good venue.
- 52:38And having support like that is just, I think, tremendous for being able to make Python accessible and also make it amazing and great.
- 52:47And I think this is why it has been able to grow so much within the data and scientific communities.
- 52:53That's an interesting question.
- 52:54And maybe we're talking about a little bit is just a few weeks ago, just this year, somebody measured and realized that Python became the second most popular language on GitHub.
- 53:05And it's second only to JavaScript.
- 53:07It displays Java, which cheer for that, right?
- 53:10Current most popular one is JavaScript.
- 53:14And I feel like that's probably highly overcounted because JavaScript appears in Python web apps, Ruby web apps, ASP.net.
- 53:24Like, you know, everything that is up there has JavaScript, right?
- 53:27So I think it's overcounting it.
- 53:28People were asking, like, why is Python so much popular all of a sudden when it's been around for 25 years?
- 53:36What are your thoughts on that?
- 53:37I have my own, but.
- 53:38I definitely come at it from a data perspective.
- 53:41So I know I'm looking at it through my own Python colored glasses.
- 53:45But I do think that the embrace of the data and scientific communities around Python has been massive.
- 53:52And I feel like it definitely came from definitely second place to R, possibly second place to Java.
- 54:02And now it has really been embraced within machine learning, within artificial intelligence, within the chatbot movement, and within data analysis.
- 54:12And I think that that's a really strong thing because those fields are obviously growing right now.
- 54:17And it's really powerful to have Python be kind of the up and coming language within those communities.
- 54:24And even for something like, okay, I do Apache Spark and I only write Scala, the second in line is Python, always the PySpark library.
- 54:34And so for these reasons, I feel like we are no longer the weird kid on the block.
- 54:39Yeah, I tend to agree with that analysis.
- 54:42I think that's a really large part of it.
- 54:43I think there's more to it, but I think that maybe is the single, if you're going to pick one thing, I think that might be the one thing that's making the biggest difference.
- 54:52You know, for example, like cloud computing, right, Google App Engine, and some of the other things that made running Python apps at scale much easier than it had been before.
- 55:00I think that has something to do with it.
- 55:02Yeah.
- 55:03But the data is probably number one and sort of, because it's a new area where it's really growing fast.
- 55:08Well, and it's just really wonderful when you hear frameworks released, particularly around new machine learning or deep learning, that almost always Python is supported from the start.
- 55:20And that's just really powerful that even if the backend is C++ or Java, that they understand and know that the Python community will kind of pick it up and run with it.
- 55:30And so they want to make sure that from the very beginning, you know, TensorFlow runs with Python and things like that.
- 55:35Yeah, absolutely.
- 55:36That's very cool.
- 55:37So another thing, as if you're not busy enough with all this stuff, another thing that you're up to is you're running a data consulting company in Berlin.
- 55:43What's the name of it?
- 55:44And what do you guys do?
- 55:45Yeah.
- 55:45So I guess off Deutsch, it's Kjamistan.
- 55:48But it's Kjamistan.
- 55:50And that's from a fond nickname several lifetimes ago in job perspective.
- 55:56And basically, we do data consulting.
- 56:00It's primarily me.
- 56:02Sometimes I get a chance to hire some folks to help out some friends and other people I respect within the data community.
- 56:09And to kind of specialize in doing a mixture of natural language processing work and data analysis work.
- 56:17And so I usually take on clients and get to work alongside teams a lot of the time or build proof of concepts.
- 56:24And that's really, really fun work.
- 56:26I bet it is.
- 56:28Yeah.
- 56:29Yeah.
- 56:29Are there a lot of companies that maybe are not software companies per se?
- 56:33There's some other specialty, but they've got a software team in-house, but not a data science team in-house.
- 56:40Also, is it pretty common that they maybe bring somebody like you or your company in to mix in a little data science or natural language processing for a particular project?
- 56:50Yeah.
- 56:50So sometimes it's things like that.
- 56:53Or other times, yeah, it's just a new startup and they need some data analyzed so that they can take it to their investors, things like that.
- 57:01Other times, it's that maybe they have a data science team and the data science team is very busy doing one thing.
- 57:08They want somebody that knows Python that they can trust their code to build out kind of a new proof of concept or a new idea.
- 57:16And then they decide, okay, is this useful?
- 57:19Are people in the company happy with it?
- 57:21If so, then they usually will take it on their own or potentially hire people to help manage it.
- 57:27Yeah, sure.
- 57:27That makes sense.
- 57:28All right.
- 57:29Very cool.
- 57:29That sounds like a fun job.
- 57:31Yeah, it's really fun.
- 57:32Very, very cool.
- 57:33All right, Catherine, I think we're running low on time, so we probably need to wrap up our topics there.
- 57:39So let me ask you two questions I always ask my guests on at the end.
- 57:42And the first is we already enumerated quite the list, but there's over 90,000 packages on PyPI.
- 57:49What one would you recommend to people that maybe they don't know about or haven't heard about?
- 57:54Well, we didn't get to talk much about NLP, but I really, really love Gensum and spaCy.
- 58:00Both of them are really changing and pushing the space of kind of where academia is with natural language processing and giving it and making it available for us mere mortals.
- 58:12So I really recommend if you want to take a look at how to use neural networks with natural language processing, that you check out both Gensum and spaCy.
- 58:21Okay.
- 58:21Those sound really, really excellent.
- 58:23And I have not tried either, so it sounds fun.
- 58:25And when you write some Python code, what editor do you open up?
- 58:28I use Vim, so I'm kind of old school.
- 58:32You know, I think that might be the single most popular editor of all the guests.
- 58:38So there's a wide variety of topics of editors, but that one might have the highest histogram bar.
- 58:44Go Vim.
- 58:45Right on.
- 58:46Okay.
- 58:47Well, that's really cool.
- 58:48And final call to action before we say goodbye to everyone.
- 58:52Keep in touch.
- 58:53I'm at KJM on Twitter.
- 58:54And you can find my company and blog posts on KJMastan.com.
- 58:59And if you're interested in speaking at PyData Berlin, feel free to reach out.
- 59:04Yeah, that sounds great.
- 59:05That sounds like such a lovely opportunity to go to Berlin, to meet all the people, and to present there.
- 59:11So definitely want to second that.
- 59:13All right.
- 59:14Well, I've learned a lot about data cleaning and picked up a bunch of cool tools along the way.
- 59:18So thank you for your time, Catherine.
- 59:20That was great.
- 59:20Thanks so much, Michael.
- 59:22Thanks for having me.
- 59:23You bet.
- 59:23Talk to you later.
- 59:23Ciao.
- 59:24This has been another episode of Talk Python To Me.
- 59:29Today's guest has been Catherine Jarmul.
- 59:31And this episode has been sponsored by Rollbar and GoCD.
- 59:34Thank you both for supporting the show.
- 59:36Rollbar takes the pain out of errors.
- 59:39They give you the context and insight you need to quickly locate and fix errors that might have gone unnoticed until your users complain, of course.
- 59:47As Talk Python To Me listeners, track a ridiculous number of errors for free at rollbar.com slash Talk Python To Me.
- 59:54GoCD is the on-premise, open-source, continuous delivery server.
- 59:59Want to improve your deployment workflow but keep your code and builds in-house?
- 1:00:03Check out GoCD at talkpython.fm/GoCD and take control over your process.
- 1:00:10Are you or a colleague trying to learn Python?
- 1:00:12Have you tried books and videos that just left you bored by covering topics point by point?
- 1:00:17Well, check out my online course, Python Jumpstart, by building 10 apps at talkpython.fm/course to experience a more engaging way to learn Python.
- 1:00:25And if you're looking for something a little more advanced, try my Write Pythonic Code course at talkpython.fm/Pythonic.
- 1:00:34Be sure to subscribe to the show.
- 1:00:35Open your favorite podcatcher and search for Python.
- 1:00:38We should be right at the top.
- 1:00:39You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.
- 1:00:49Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
- 1:00:53Corey just recently started selling his tracks on iTunes, so I recommend you check it out at talkpython.fm/music.
- 1:01:00You can browse his tracks he has for sale on iTunes and listen to the full-length version of the theme song.
- 1:01:05This is your host, Michael Kennedy.
- 1:01:07Thanks so much for listening.
- 1:01:09I really appreciate it.
- 1:01:10Smix, let's get out of here.
- 1:01:13Stay tuned.
- 1:01:34Don't believe.
- 1:01:34Thank you.