Mattan Griffel is an award-winning Python teacher. As an adjunct professor at Columbia University Business School he’s spent the past three years teaching Python to MBAs.
Mattan is currently working on a book titled Python for MBAs.
In this episode, Mattan and I discuss how entrepreneurs and product managers are using Python. We look at use cases, and take a deep dive into the controversial debate: Python vs. Excel.
In this episode, we cover:
- Why are business school students learning Python?
- What kind of jobs do business school students land?
- What Python libraries should MBAs learn first?
- Mattan’s MBA Python success stories
Why are business school students learning Python?
Mattan Griffel: Why would an MBA ever have to learn how to code? There are software engineers who do that. But there are a few factors. First of all, Columbia University started seeing MBAs are not necessarily going to work at investment banks or in finance or consulting anymore. A lot of them were graduating, and they wanted to work in tech or at startups or start their own companies. So Google, Amazon, Facebook, Microsoft, these companies started to be more significant hires of MBA graduates, and especially in the area of the product, product management, and making product decisions.
So at these companies, like Facebook for example, where it’s a tech company, they want everyone coming in, to at least have some understanding of technology. So what they started to see was when Amazon or Facebook hires an MBA, they would almost inevitably have to train them in Python or in SQL or in something.
Or the students would be graduating trying to find jobs and see job descriptions where it would be, even though it’s a business analyst or a strategy role or whatever they were hiring for, they would want them to know how to code. It started as just a little line item.
So the graduating students and the people joining the workforce would say, “Hey, I wish that we had learned this in school. I just spent all this money getting an MBA, and now I have to spend more money to learn about coding.”
They started to realize that, and then they reached out and asked me to create this class. It’s an elective class, so it’s not part of the core, but it’s become one of the most popular classes there. This semester, we’ve got 250 students learning Python, and then another 150 with some overlap learning SQL.
How many students are at Columbia Business School?
Mattan Griffel: There’s like 550 per class.
Chris: Nearly half.
Mattan Griffel: Yeah, nearly half of them now are graduating knowing how to code. It creates an interesting dynamic because it means if you’re not one of those people, but you’re going into a workforce where other people have learned this stuff, then you’re at a disadvantage.
What kind of jobs do you find that your business school students are looking for?
Mattan Griffel: A lot of analyst roles, even financial analysts roles – the idea is not that these students are going to go on and actually be software engineers. It occasionally happens in 1% or 2% of the cases, when people decide, “Oh, I really like this, I’m going to want to be a software developer.
More realistically, you have someone who would use Excel to do something at their job, but if you know Python and you can do it faster and better, then people use Python instead. So it can be analyst roles, but also even if you’re in product roles, like you’re a product manager o a product marketer, knowing about technology so that you can talk to other developers is really useful. That way, you can make decisions about what you should build into the product, what sort of features you should put in and things like that.
And even now, I’m starting to talk to people in operations or finance roles, like accounting, you would never think that accounting would become coding-related, but it is actually.
What are your MBA students studying, and how does your Python for Business School fit in?
Mattan Griffel: So in a business school, typically what they have is there’s this core. The first semester you get in, you’re learning the basics of marketing, accounting, finance. Everyone takes the core. You’ve got statistics and analysis. Because we recognize statistics is pretty important. It affects a lot of different things. So you’re going to learn it.
But for most of those classes right now, the assumption is if you’re going to do any kind of work with data or do any sort of analysis, you’re using Excel. So in the statistics class, you’re using Excel. In the finance class, you use Excel. Marketing, there might be some Excel in terms of that’s the form of the data. You might be playing around with it or whatever.
At the moment, students are going through the core, and then in their elective time, they’re choosing to learn Python, or they’re choosing to learn SQL when they want to learn how to code. But more and more people are realizing that this is going to be important, so they decide to take the class earlier, and then all these further classes start to build on it.
So now you’ve got students who are learning Python in their first year, and then they’re learning how to do data analysis with Python, or they’re learning how to do the same kind of financial modeling that they did before in Excel, but in Python, which is significantly more powerful.
And the funny thing about it, and I was kind of shocked when I realized this, is the same professors who are teaching the finance classes are actually using Python on their own when they’re doing their own work, like they’re doing research, running calculations, they’re evaluating companies or running models.
Chris: But they’re teaching Excel in the classroom.
Mattan Griffel: But they’re teaching Excel in the classroom. And because they don’t even do the work in Excel, they constantly have to refresh themselves on how do I do this in Excel, so they can teach the students that. But that’s not even how people do it in the real world. Right?
And these people, these finance professors, they never studied Python, they never learned how to code. They figured it out because it was just a thing that that’s how the industry evolved.
It’s a funny disconnect right now. We’re in the middle of a shift. I would say give it a few years, and you’re going to start to see the tools that are being taught in business schools are going to evolve, and you’re going to see a lot more coding.
Why and when would someone use Python vs. Excel?
Mattan Griffel: Yeah, great question. So you’re using Excel, and you’re working with data. And Excel is a perfectly useful tool for certain kinds of data or certain types of tasks that you’re doing. If you’ve got a relatively limited amount of data, even up to hundreds of thousands of rows of data potentially. Everything that’s pretty small, you can do everything you want in Excel, and I see people do some pretty advanced stuff in Excel.
For example, if you’ve ever looked at a model that an investment banker creates in Excel, it’s pretty complicated. And in fact, they’re doing some technical stuff in Excel that is more complicated than things I do in Python. I’m amazed by it. But they don’t consider it to be coding.
Chris: Just because it sounds a little abstract, a model for banks or this kind of thing, what does that mean? Is it breaking down finances? What specifically is that?
Mattan Griffel: A lot of what they’re doing is…let’s say that you work in finance and you’re considering whether to buy a company. If you’re in private equity, that’s what these large private equity firms do is they look at companies and they decide, is this company undervalued, can I buy it, and can I make it more valuable and sell it?
Chris: This is very business school right now, right!
Mattan Griffel: Or let’s say it’s a public company, and you’re like, “Should we buy stock in this company,” or something like that. Right?
Chris: Okay.
Mattan Griffel: That’s very financey, specifically.
Chris: Very finance kind of question.
Mattan Griffel: So we’ll go into that example. When they’re evaluating the company, they are looking at all of their accounting. They’re looking at all the statements to see what’s the profit and loss, where are you spending money, all of this stuff. And then they’re also collecting all sorts of other data about that company. They’re doing as much research as possible.
And they’ve got, at this point, dozens of Excel files keeping track of all this data. How much money are they spending? How many employees do they have? What’s their product look like? As many different things they can measure as possible.
And it’s all connected together because what you’re trying to do then is your model essentially is trying to make a prediction about the future. So you’re saying if the last three years worth of data looks like this, can we make an estimated guess about what’s going to happen in the next three years?
Chris: Like if we see a trend and things are growing…
Mattan Griffel: Exactly.
Chris: Percentages are going up here, there.
Mattan Griffel: Yeah. It gets advanced because you’re not just doing at the high level, like how much money is this company going to make, but what’s going to happen to the office expense, what’s going to happen to the cost of software as the number of users grows. So it gets quite intricate, and these things are all linked together.
So you’re doing that in Excel, but Excel is a really good tool. It’s kind of this abstraction of … what was it called? Lotus 1-2-3, I believe, which was in the 80s.
Chris: I’ve seen it. Yeah.
Mattan Griffel: I never even worked with it. But it’s a really good interface for doing this stuff, but it’s really not good at certain things. The most obvious example is certain amounts of data.
We live in a big data world now. Meaning there’s all this available data, which didn’t use to be available. And we’re starting to track it because more things are happening online and are being digitally tracked. We don’t understand the data, we’re not analyzing the data, but it’s available. And the more you’re able to track stuff, the larger the data sets become.
It used to be that you’d have an Excel file with the price of a company’s stock every day for the last six years. That’s not a huge amount of data. Now you can track it on a minute-by-minute basis, on a second-by-second basis. Now you’re talking about potentially files with billions or trillions of rows, that level of data or that amount of customers.
Walmart, for example, has a database that’s so large that if you tried to sort it, it would never finish, in the heat death existence of the universal sense. It’s just impossible. That’s the kind of data I’m talking about.
I looked it up because, in my database class, I was like, “I wonder what the biggest database is.” I was Quora googling, and it was like, “Yeah, don’t be stupid to try to sort WalMart’s dataset because it’ll just never finish. So much data.
Chris: Wow.
Mattan Griffel: And then you go to… for example, data.gov is this great government initiative, where they put all of these data sets online, like healthcare data, environmental data, you name it. If you’re interested in educational data, manufacturing, whatever, you can download these Excel files, and you can play with the data yourself and figure out some pretty interesting things. But don’t try to open it in Excel, because you’re talking about massive amounts of data.
So that’s just the first obvious example. Working with that data in Excel is just not possible. It’ll crash. It’ll load forever and then crash. Whereas you can basically do the Excel stuff, but in Python, and Python has no problem. Millions of rows, billions of rows, trillions of rows, not even a question.
You might ask why that is, and it comes down to how the two are built. Python is just more computer-friendly at the end of the day. So when you’re dealing with huge amounts of data sets, you just can’t use Excel as a tool anymore.
But even beyond that, if you’re doing any kind of repetitive automatable task, like let’s say you do something every week that you could do in your sleep or you could explain to someone else, you always generate the same report, and you email it to someone. You can write code to do that for you.
So what you’re saying, is that MBAs can benefit from learning how to use Python for automation, right?
Mattan Griffel: Yeah, totally. You can use Python to create PowerPoints for you, and then automatically email that to your client, for example.
And then the nice thing there is, yeah, of course, you could try to outsource some of that. But when you outsource it, you then have to hire someone to check the work of the people that are doing it, because there’s always human error. But you know when you’re writing code, if you write it and it works, then it will keep working as many times as you get it to work. There’s no human error there. The computer program doesn’t get tired. Right?
Chris: Yeah. I think you mentioned a book last time called … was it Automate the Boring Stuff?
Mattan Griffel: Yeah, Automate the Boring Stuff.
Chris: So that was where that comes from?
Mattan Griffel: Exactly.
Chris: You can just write code to do all the steps?
Mattan Griffel: Yeah. So there are large datasets you can’t really work in Excel, really repetitive stuff that you would use Python to automate, and then there’s really complex stuff that you can’t really do using any of the available tools. And this is a hard one to explain because we get so used to thinking within the box of the tools that we currently have.
We know how to do everything with the tools we currently have. We don’t really know about the things that we can’t do with what we have now, because we just never really think about them.
There’s a lot of stuff that if I asked you to try to do it in Excel, you’d be like, “No way. I’m never going to do that. It’s going to take me forever.”
A simple example of this is I can give you a dataset, and you can figure out the correlation between any two columns in that data pretty easily. But let’s say I give you a data set and it’s got a hundred different columns worth of data. And now I said, “Okay, come up with all the different possible combinations of those columns.”
So every possible set of three, for example, out of a hundred. There are thousands of them. And run that same correlation across all of those, and tell me which set of three is actually the most highly correlated.
You’d be like, “I could do that if you gave me like a million years, but it wouldn’t be worth it.” And that’s the kind of thing where you can use Python, for example, and it would do it in half a second. So these are things that we don’t even think of doing in our jobs because it’s just not feasible currently, but you could use code to do it for you and to unlock for you.
Chris: Wow, that’s amazing. That’s super exciting.
Mattan Griffel: I think that answers your question.
Chris: That’s the best answer.
Are there certain Python libraries that MBAs or business people should learn first?
Chris: I want to hear more about learning Python then. So if I’m in the classroom, I know that there are a lot of specific things that I’ve heard around Python, like Jupiter notebooks and different libraries.
Are there certain Python libraries that MBAs or business people or even just the person who isn’t going to become a developer should learn first? Where do you start if you want to learn Python and you don’t want to become a developer, you just want to run a business, just want to have an option other than Excel?
Mattan Griffel: I teach three different applications of Python code in my class, and they’re somewhat related, but they’re also kind of different. The idea is Python is just a language like any other language that you would speak to talk to people, except it’s a language to talk to computers and to tell them how to do certain things. So you’re unlocking the power of a computer to do something maybe faster than you can.
So you need to know a little bit about the language in the same way that you need to know a little bit about Spanish before you can read an article or talk to someone in Spanish. But you don’t want to focus so much on the grammar and learning as many words as possible, you want to know enough so that you can then do cool stuff with it.
Chris: Like when you’re going to go to a restaurant, you want to be like, “Yeah, I just want to know how to ask for the bill.”
Mattan Griffel: Exactly. Right. At a certain point, you’re going to stop trying to memorize words and actually go out there into the world and do cool shit with it because that’s why you learned in the first place.
I teach enough Python so that I can then show them the cool stuff. So in my class, I’ll do three classes worth of the basic Python, and then I focus on three different areas. I focus on data analysis, showing them how to use Python to do what Excel can do basically, but then go above and beyond, create really cool looking charts, do data cleaning, do all sorts of different cool stuff in Python.
And that’s one whole area of something you can use Python for, is data analysis, and that is just a profession that’s just blowing up in terms of popularity.
Chris: Where do you Google to start learning, going down that path?
Mattan Griffel: Data analysis? So there’s a great book, it’s by O’Reilly, and it’s called The Data Science Handbook, by Jacob VanderPlas. And it is available totally online for free. Out of the goodness of his heart, Jake put it online for free, and you can go, and you can walk through it.
So there’s data analysis, and then there’s APIs. It stands for application programming interface, but it’s really not all that important that you know what it stands for, as much as that you know what you can do with it.
Chris: API’s the second use case?
Mattan Griffel: Yes. Second use case outside of data analysis.
Chris: Okay.
Mattan Griffel: And that basically means you can use Python, or just code generally, to interact with these other websites that other people have built, these other services in some cases. An example of this would be you can actually write code that will get the current weather outside where you currently are. That’ll tell you what the temperature is, that’ll tell you what the forecast is for the next few hours. So your code can go to the web and get that information.
You can write code that sends someone a text message using the Twilio API. Twilio is a publicly traded company that built this technology, that allows you to write code to send text messages and make phone calls. The weather one, there’s plenty of them out there, but one that I teach is called Dark Sky.
You’ve got these APIs that allow you to get updated stock prices, to even make stock trades. Like Robin Hood, for example, has an API, and you can write code that’ll make your trades for you. So you can do it manually through the app, but you can have code trade for you. And that’s how these automated funds work, essentially, is they say when this stock goes past this price and makes this kind of pattern, buy.
And then once this happens, sell it. And it’ll do thousands of those trades every minute. And that’s how you have code that’s basically replacing the jobs of traders and people actually doing this stuff manually.
Chris: Amazing. So the second use case is using Python, learning how to write Python script to use these APIs, which is more or less like ways to interact with the real world in live time. Is that what I’m hearing?
Mattan Griffel: Yeah. And ways to interact with the internet, basically.
Chris: Ways to interact with the internet, making programmatically automating these kinds of things so that you can control life itself.
Mattan Griffel: Yeah. And then the third use case, which is kind of related, is building web scrapers. So writing Python code that goes to a website and actually goes, maybe searches Google or searches Amazon or looks for flights or whatever, and saves the data to an Excel file.
It’s stuff that you might actually try to do yourself manually, but it would just take time and be kind of annoying every week. It’s not relevant for every job, but sometimes you want to keep track of, let’s say the price of a product on Amazon, and track it a day over day for several months.
And there are entire businesses that do this, like the whole flight search businesses where you can search in one place and see where the cheapest airline ticket is, they’re basically using scrapers to scrape all of these other websites and aggregate all these things together. So you can use Python to do that. And that’s the third thing I teach.
Do you have any Python student success stories?
Mattan Griffel: My favorite stories are people that go, and they surprise themselves because they were able to use what they’ve learned in their job or in their internship. They do a lot of internships at MBA programs. You have the summer internship between your first and second year, and then a lot of times, based on how you do there, you get the job after graduating.
So I had one student named Amrinder who got an internship at Amazon, and he was a product marketing manager. He sent me an email afterward being like, “I didn’t expect to do this, but I was able to write a Python script to manage our Adwords campaigns.” Because he’s like, “We have thousands of different Adwords, and we were doing this whole thing manually, so I wrote a Python script to aggregate them and do all this calculation for us.”
And he’s like, “And they gave me a job offer, and instead of giving me a product manager offer, they made me a senior product manager. So I got a raise above what I ever expected, and I’m now considered one of the technical people at the company, like a technical product manager basically.”
And he just took one Python class.
Chris: Amazing.
Mattan Griffel: Right? And obviously, I give him a lot of credit for figuring out how to apply this and do it. It’s not easy what he did, but there’s a really interesting example.
I have another friend, Malachi, who ended up working at Facebook and had to learn SQL, and figured it out. He became ITA, created all these SQL examples, and he’s now working there, and he’s doing all this database transaction stuff.
Chris: So he’s using SQL at Facebook to do product stuff?
Mattan Griffel: I think he’s in product management, yeah, doing product stuff.
And a lot of that’s because, at these tech companies, they’ll have databases with a lot of really valuable data in them. But if you want to get access to the data, it’s kind of up to you. They’ll be like, “Here you go, here’s login, go grab the data,” because they’re not going to waste the time of a developer to help you get the data that you want. Their mentality is more to make you learn how to write SQL code and go grab the data yourself.
Chris: You teach these two courses, Python and SQL, and these are great stories of getting jobs at Facebook, Amazon, these companies. If you only took one, if you had to say, “I can only have time to learn one, Python versus SQL,” is one better to learn, or do they work together?
Mattan Griffel: They do work together. But I would say learn Python. And the reason why is SQL is really useful if you work at a company that has a database and they’re going to give you access to it. That’s not most companies.
There’s sort of culture around that in some of the larger tech companies where they allow it. But the problem is if you learn SQL, and then you join most companies, and there’s no database, then it’s going to be totally useless and irrelevant for you.
Whereas Python, it’s one of those tools where you can use it to solve so many different kinds of problems, and it doesn’t matter if you have access to a database at the company. You can use it to do your data analysis stuff, your web scraping stuff, automating your tasks kind of things. So on the whole, it’s more useful, but the two definitely work together in many ways. You can use SQL to get data from a database, and then use Python to analyze it, for example.
Chris: Do they literally plugin together, or you’re saying having the skills parallel is…
Mattan Griffel: No, they can literally plugin together. You can write Python code, and then use SQL library, and then have the code basically talk to each other.
Chris: Nice.
Mattan Griffel: Yeah.
Chris: Sweet. I want to wind down a little bit. But before we leave this interview, I want to talk about the book that you’re working on. Can we talk about that in the podcast?
Mattan Griffel: Yeah. Totally.
Chris: Okay. Because I know you’re still working on it. It’s really exciting.
Mattan Griffel: Yeah.
Chris: What’s the title of the book?
Mattan Griffel: Right now, it’s Python for MBAs.
Chris: Python for MBAs. Great title. Why write a book, Python for MBAs?
Mattan Griffel: So the reason why is my class being more popular than I ever expected within the business school. I don’t think anyone ever thought MBAs are going to be learning how to code. And as I’ve done this, I’ve started to see more popularity around this.
Harvard has this famous class called CS50. It’s basically their intro to computer science class, and it’s taken by all sorts of people, and it’s like 800 students a semester, not just people in computer science. It’s all online. It’s a great course to watch, talking about free resources. It teaches a bunch of different things, and it’s not necessarily where you would go to learn how to code, but it’s…
Chris: Pretty low-level, right? From what I’ve seen.
Mattan Griffel: Yeah. Exactly.
Chris: You wouldn’t go there to learn how to apply it to business or to make a website. It’s more of … not the theory, but lower level.
Mattan Griffel: Right. But they recently did a CS50 for MBAs.
Chris: Oh, interesting.
Mattan Griffel: And I don’t think it’s available online, but now Harvard Business School is like, “Oh yeah, we’re going to do coding.” And then I found out Kellogg, in Chicago, has a Python class within their marketing department.
So you’re starting to see these different classes pop up at MBA programs across the country, and I just realized there’s no book out there for that. There’s no textbook. So every class that exists, there’s a textbook for it. But there’s no textbook here, and there’s no standard for how these things are taught.
So the hope is for this book to be that standard, and that as it becomes more of a thing that’s being taught, they use this to create the structure of the classes.
Chris: That is so exciting. What’s the timeline for the book? When can we expect to …
Mattan Griffel: I’m going to finish the manuscript and submit it by the end of the year. And then I believe it’s somewhere between 6 to 12 months to release it, depending on the launch cycles. So it seems so far out when you’re used to the startup world. So sometime 2020.
Chris: Wow, that’s so exciting. It would be so exciting not only for the Columbia students to have it, but for other business schools to potentially use this, or anybody. It really gives access to the whole world to use Python for business. That’s what I love, it’s so powerful.
Mattan Griffel: That’s the goal.
How is your Columbia University Python course different than One Month’s Learn Python course?
Mattan Griffel: Yeah. The One Month course, first of all, it’s more compact. Columbia, it’s a six-week course, it’s just three hours a week. And you also recognize people are taking other classes, and it has to fit into their schedules and whatever. Which is also true for the One Month course, but in a different way.
The idea of the One Month course is you’ve got a job, you’ve got a busy life, you want to learn something, but you don’t have a huge amount of time. So you want to set aside maybe 15 minutes a day or 30 minutes a day, or perhaps an hour or two on the weekend, and get through. So the idea is a lot more like go at your own pace, watch the videos whenever you want, submit the assignments.
But what you get above picking up a book or watching regular videos online is that you actually get the interactivity of people who are going through it and giving you feedback on your assignments. So you don’t just feel like you’re alone going through this process, you actually feel like you’re getting help.
Partly, the goal is to create a little bit of what that MBA community model is like, where you have the other students, and you have the community, but for a fraction of the cost. And for, honestly, the lives of people who are not going to quit their jobs and take two years and spend $200,000 to get a degree. Maybe they don’t need that. Perhaps they’re just dipping their toe in the water, or they just want to learn something.
Chris: Sweet. That’s cool.
Mattan Griffel: Yeah.