Learning Python for Data Science with Posit Academy
videoimage: thumbnail.jpg
Transcript#
This transcript was generated automatically and may contain errors.
There we go. Very good. Hey, everyone. Thanks for joining us. We're going to get started in just a few seconds. We're going to give folks a few seconds to pop in. Happy Wednesday, wherever you are. Drop where you're coming from in the chat. I'm from Philadelphia and my colleague is from Vancouver. Very good. Let's get going. So before the presentation, some helpful information. The recording of this presentation will be available right here immediately following the presentation. You can put questions in the chat or you can ask them anonymously through our Slido link. For more information about Academy because we can only cover so much in this period of time, just go to Posit.co backslash Academy.
And we already got a question about this. So I want to call out Posit Academy is currently only offered to groups of learners. We're working through how to expand the offering, but the group experience is a core part of the Academy experience. So again, it's currently offered only to groups of learners. And if you're not familiar with Academy, we introduced Posit Academy to the world last year for groups who want to learn R and we're thrilled to have recently introduced Python curriculum, which is why we're here. So the presentation is great for folks who are unfamiliar with Academy. This is a great sort of introductory presentation. Groups of data professionals who are interested in exploring training solutions and organizations that want to become more data driven, specifically with code based data science. So R and Python. With all that said, I'll hand the presentation over to my colleague, Daniel Chen, who is a data science educator on the Posit team.
Why learn Python?
All right. All right. Hello, everyone. Good day. So I'm Daniel. I'm currently a postdoctoral teaching fellow at the University of British Columbia. And I am also a data science educator here at Posit. And so I wanted to start off today by just doing a quick answer of why you should learn Python. And the short answer is Python is just objectively popular. So it's ranking number one here on the TOBI index. And it's above languages like C, C++ and JavaScript.
So it is a very popular programming language. And just for reference, R is currently ranked number 16. So it's still up there, but it's just not number one. Right. And Python, even though it's number one in popularity, the way it got to its popularity is actually being second best for pretty much everything. And so here's a response from Van Lindberg, who was the former general counselor for the Python Software Foundation. He just stepped down in April. And even he had echoed this statement about it's really like the second best for everything. If you don't know where you're going in the future, Python's a pretty safe bet in terms of tooling.
The problem with workshops and online courses
And so today I want to talk about how do we train a data scientist in Python. And traditionally we've done things like workshops. This is generally my background of teaching. It's all coming from workshops. And then also what we've done in the past is or what you've probably taken in the past is stuff like an online course. And if you sort of think back on your experiences with taking workshops or online courses, essentially if you never got to use the work that you were learning, chances are you either retook the same workshop or online course or you sort of just let your knowledge taper off.
And that's something that we know can happen. We actually know a lot about learning. And this is one of the books I'm currently reading right now, which is called How Learning Happens. And it consolidates a lot of the educational literature into a single book and talks about a lot of learning theory related things. I would say if you want to talk about other resources and books about learning, like we can talk about it in Q&A as well. And then even internally at Posit, so here's my supervisor Garrett, we've taught workshops from the company's perspective and we've actually taught them almost like too well.
And then even like myself, I've taught workshops and my body of work is actually, I've done this workshop teaching stuff for my dissertation work. So on the left hand side here, here's an example of what I would expect somebody to get out of a short workshop doing Python and data science. And so here's like a script I want you to be able to run. I want you to be able to load some data sets. I want you to be able to filter, save out a data set to start the process of a pipeline, identify how to process and clean data, plot it, maybe fit an EDA exploratory model and then look at its output. And so there's like seven things that I just mentioned.
And what I found in even my own dissertation work was if I took your self report on how confident you are with those seven tasks I just asked, and I asked you pre-survey, pre-workshop, after the workshop and then four months out, it actually turns out that like, yes, workshops seem like they work. Everyone believes like they can do all of these tasks. And then essentially four to four plus months out, you can see like the response is almost back to baseline. And it's because like people, it just seems like people aren't really using this stuff even though we put a lot of effort into teaching this information.
The forgetting curve and spaced practice
And so how do we come back to this? Like it's one of the core principles that we're trying to address here at Academy. And that notion of you taking a course like a workshop or something short term and forgetting it or having that information decay, it's actually, we know this is a known process, something that happens. And so here is like the forgetting curve where on the y-axis here is, you know, arbitrary measurement of your ability to master a topic. And then the x represents time. And so usually right after you learn something, you probably have a lot of pretty high recall on what was being taught.
And then what ends up happening is if you don't practice the task again, you essentially will forget, slowly forget the information that's being taught. And so one of the things and key components here at Academy, what we try to do is put in regular points of feedback, or sorry, regular points of practice, just so you can re-bring back that information back to you. And so you don't have to relearn everything from scratch. Just a little bump is enough to say, oh yeah, I remember how this works. And then we, in Academy, we tried to do this over and over and over again, up to the point where you are pretty much understand that material, or at least that's the goal.
And if you've ever been in a scenario as you've been learning something on your own, and you end up in a scenario where like, I've just been struggling trying to learn this for like two or three weeks. And then like, I can't really tell you why or how it happened, but like, I read this one sentence that I've been reading over and over again, and all of a sudden everything clicked. And so that's really one of, that's something that you can notice about yourself. And it's coming from you reiterating and practicing and re-reading the materials and going through the materials multiple times.
And so there is this saying about like neurons that fire together, wire together, right? So if we end up in a situation where like we have two things that's just connected in our brains, and we focus on practicing one set, the part that we're practicing will actually get strengthened. And then the part that we don't practice will eventually fade off, up until the point where learning a body of material. And so again, like that's one of the main things that we're trying to do here in Academy is teach you a topic and provide regular points of practice for you to achieve some type of mastery.
teach you a topic and provide regular points of practice for you to achieve some type of mastery.
And so just like with any skill, you need practice, but you also need practice over time. And so like, you know, one of the analogies that we have in Academy is like, it's very similar to playing musical instruments. So like I've also played the piano when I was a kid, and it's, you do have to practice this on a regular basis for you to just be able to play a piece, right? And no matter how well you play, you're not going to be able to play a piece, right? And no matter how well you are, like I was terrible at sight reading, so I couldn't even fake it when I showed up to class anyway. So you really do need practice and practice over time. And data science is one of those skills that you, again, you need to practice it, and then you need some mechanism to kind of guide you over an extended period of time, not just take like a short-term block of materials to learn, and then sort of like, where do you go from there?
So what about online courses? We've heard about massive online, open online courses. Those usually run for multiple weeks as well. But the problem with MOOCs is people, the completion rate for MOOCs is very, very poor. And so people get really excited, especially if it's a very popular and free class, like everyone's excited at the beginning. And then over, you know, a couple of weeks, you know, life kicks in. It just becomes really hard and motivated to sort of just keep along with the actual course.
And so that's the other thing that ends up being really important is practice does also require motivation. And so what we try to foster internal and external motivation through academy as well, and that's sort of the reason why big group learning is a core component of what makes academy work, along with some other stuff that I'll talk about in a bit as well.
The Academy approach
And so if we think about the traditional teaching format, so I just finished one term of a class, and I'm teaching a new one right now, and I'm putting together these slide decks, I just realized, like, yes, the two courses that I'm just teaching, they're pretty much taught in two different styles. And the one that I just ended up finishing follows this more traditional model where I as the educator have information to give you as the student. But then it's really, like, up to the student to do the actual learning. And it actually takes a lot of work on the students to actually go and master the information that I'm trying to provide them.
And, you know, I sort of realized putting together these slides, like, yeah, I actually just was one of the trainers that actually fell into this trap of, you know, being, conveying information in one direction and then sort of like, okay, if the student needs help, they'll come back to me. But at academy, we try to focus on this actual loop and be really explicit about it and have the educator also be part of that loop. And that's sort of why we've seen, like, a bunch of great results over the last year with our, when we first launched.
And so how do we as humans actually learn regular skills? Well, there's also a process for this that is, that a lot of industries and fields use, like, for example, in medicine or any of the skill-based trainings. There's apprenticeships, internships, residencies, or coaching. So how do we go and then apply that to learning Python for data science?
Well, here's the key features of academy. We have individually-paced tutorials. And the tutorials are set in such a way where they're supposed to be, they are, you do need to spend time to work through them. It's typically under an hour's worth of work in total. But it's also small enough to reduce the cognitive load on yourself as you're going through the material. So it's not too much information at once. At the same time in academy, we have a small group learning environment. So you're learning, you have other people that you're learning with. So if you have a question about something, chances are someone that you're learning with will also have the same question because you're going through the materials at the same pace.
And then you have people like myself who are mentors and do the actual mentoring. And we sort of guide the ship to make sure that like you're understanding the materials that we're providing, but also giving you the flexibility to explore what you think is interesting to yourself and sort of guiding you there. So you don't end up, you know, looking into a method that isn't exactly what you want or is making your life a little bit more difficult. So that's our role as the mentors to help facilitate your learning.
And the other really nice thing about academy to build on your motivation is we have industry specific data sets for your projects. So it's not like a complete cookie cutter for everyone going through the experience. Depending on the industry that you're in and the vertical that you're in, we will have a data set for you in that industry. It might not be exactly the type of work you're doing for your job right now, but it's close enough. And that's also to help bring a little bit more motivation. You might, you know, look at the data a little bit differently. You might try to explore, try a new package or go down another field. That's something that we didn't present to you explicitly, but you still have the resources to go learn on your own. And then the mentor sort of can help guide that self-learning process as well.
So it's all about that long-term engagement and all about, okay, so after 10 weeks, can you still stick with the skills that we're teaching you? Like the actual skills of doing Python and data science, but also the skills of just learning on your own.
The Academy structure: milestones, tutorials, and group sessions
And so how does this actually look like in practice? Well, you have your academy mentor. So here's Brendan. He's one of my colleagues. He'll play the role of a mock academy mentor in this example. And then you have a small group of academy teammates. Typically right now, it's all in the same group. So you'll notice that the position for these mock group mates, which in reality are also my coworkers, they are all roughly in the same, working in the same domain.
And so as, again, as you're learning, you can have similar questions and you can help each other out. And so here in this example, you might work on a project for academy comparing asthma treatments. And this is something that you'll work on over the course of 10 weeks. So in this particular example I'm showing you, it's primarily in the life sciences. But again, like I mentioned, we can swap out asthma treatments for some other vertical or some other domain.
And so what ends up happening is, well, we go through the process. Well, we're teaching you data science. The first word of data science is data. So how do we get data in? And so we'll show you how to import data into Pandas just so you have your data frame that you can work with. Then we go through and show you how to explore data. Once you're done with exploring, you might go wrangle and visualize or do a little bit more data processing. And then at the end, your takeaway is going to be some type of report using Quarto for the Python course. And that's what you'll end up at the very end is this report that goes through everything that you've worked with over the last 10 weeks.
So how do you go and accomplish this project? There's several key components. And I'll show you how all these bits and pieces come together before I'll actually show you a real demo of stuff of what's going on. So we have our big project. It's broken up into 10 progressive milestones. And the milestones are kind of like bite-sized pieces of a larger project. But we've broken it up into one week components. And this is one of the mechanisms of getting you engaged over a longer period of time. And so Academy is 10 weeks of actual working time. And then there's typically a couple of weeks in the middle, just as a break or catch-up week as well.
And so you have your Academy project. Overall, it has these five different components. So you'll import some data, explore, wrangle, model. And then at the very, very end in week 10, you put it all together into a single Quarto document for a report that you can share with your colleagues. And that's sort of the end goal is to have a data science report that you can share.
We take these overall components, and that's what the 10 milestone pieces become. And so in our Python course, these are the actual 10 milestone topics. So we have Python basics, visualize, create select columns, et cetera, et cetera. And we have modeling and sharing reports at the end. And I like to bring up, this is sort of where the challenges of just teaching data science for Python starts to come up. Because if our goal is to teach you data science in Python, just by nature of how the data science community evolved and grew out of Python, there's a lot of on-ramping, like prior knowledge, that we need to be able to teach you for you to be able to do and program the data science in Python.
And so the way we've handled this is we sort of go through some of the basics in week one, but we still try to get you something that you can do by the end of week one that is like the main like, oh, this is really exciting. And the way we do that is we sort of introduce a little bit of the report stuff to you, maybe a little bit of figure generation, just so you are a little bit more motivated to continue on. And you have something very tangible.
And the other way that we've handled this is like larger topics, like just visualizing and writing functions. Those are pretty heavy concepts, and especially writing functions. It's a very heavy programming, like basic programming concept. The way that we've solved that problem is we take, we introduce the concept in one week, and then over the next couple of weeks, we sort of smear out some of the more advanced topics as well. So one, not only does that help you engage with a more complex topic over a long period of time, but it also prevents this notion that like, oh, I'm just in week three, and all of a sudden, I feel like I'm in my intro computer science course again, and I'm no longer feeling like I'm making forward progress towards like a data science milestone.
And so that's sort of the challenges that we ended up facing while trying to put together this curriculum. And I think this is something that seems to work, especially given the time constraints. And also, if you think about what I mentioned before about reducing cognitive load, we're also not trying to just dump everything on you, because then it's just too much information for you to adequately retain and apply. And so there's always that balance there, and I think we figured out a pretty good balance for that as well.
Okay, so back to our academy project. It's composed of 10 milestones, and then for each of our milestones, you go through a series of tutorials. After the series of tutorials, you go and finish that little milestone chunk, and then what we end up doing is having a group session where we all talk about what we did for a milestone, and then that's where a lot of the mentoring, guiding, additional information, and active learning comes into play.
So I've talked about group sessions. This is a big component of what makes academy special, and I think it really enriches the entire learning experience for mentors and instructors, but also really the learners.
So the way this happens is we literally meet up on a Zoom call. There's going to be a milestone that's presented. I will actually demo a real-life example at the very end, and you as the presenter, you talk through what you did, and me as the mentor, I tried really hard not to share my screen or take over your screen, and we talk you through your problems. And so in some sense, you're also getting a feeling of what pair programming feels like because I tell you the line and what you need to type and go through it. I can Google things for you in the background and tell you how things work. I can tell you what to Google and point to you, tell you on the screen what you're looking at, and so it becomes a very... You get some experience with pair programming if you've never experienced it before, but it's also like you're in control, and I don't want this to end up being like another lecture. It's supposed to be guided towards what you need help with.
And so again, like we do this across everyone in our group, and so that's why the groups so far in academy have been relatively small, and it's because we need time for everyone to be able to present their information, and there's a pretty good ratio between students to mentors. And I think right now, that ratio is around seven, but we're tinkering with bumping the ratio, so I don't know exactly what the final number will end up being if we do bump up the numbers.
But the other really most important thing is you're doing this with your group members, and so that means that at the end of the academy experience, you have those connections that you took this entire course with. And so if you continue to use Python, you have other people that you can reach out to after you're done with the academy experience, and because they've all started in the same place, you're more likely to feel comfortable more comfortable speaking and reaching out to them because you've taken a course together, and we've literally shared screens, and we've all seen the things that you struggled with and how you've gotten better. So it all helps your own motivation, and it makes you feel good that you have this other group of people that you can reach out to, because that's the other thing a lot of times with learning new things is you're just afraid or you don't even know who to ask for help. And so we're trying to build that support network in the course, and then also hopefully this is a network that stays with you outside, and that's another way we try to engage you or keep you engaged over long term, and that's where the learning really happens.
And so your academy project, it comes with multiple components for every given week. You go and do the tutorials, you complete, and you personalize a milestone, and again, I'll show you what that experience would be like at the end of this portion. And then we present this to the group, and a lot of times people really do feel like this is where a lot of the really rich conversations happen. Sometimes depending on the learning, the experiences of the group, we get to talk about more complicated stuff. And even if you're a brand new beginner, just seeing the more complicated stuff, knowing that it's possible, you know, as an absolute beginner, that's really all you need to know is that this is possible. And then for someone who's a little bit more experienced, they know how to actually go and implement it.
And so there's, I actually prefer it when our small groups have a mixed experience level, only because we get to have just a more rich conversation for everyone to learn from. And then in the middle of the week, we have a coworking session, just so you have blocked off time where the mentor is available to answer your questions, essentially like office hours from the university perspective. And then we have some form of asynchronous communication like Slack or Microsoft Teams. And then if you post your questions, we can get back to you. We can share more complicated blocks of code or other resources to help with your learning.
And then that's just one week. And then you rinse and repeat, do that for 10 weeks, and then that is your academy experience. And so it is a very long engagement, but at the same time, that's sort of the point because we've, hopefully I've convinced you that really, if you're not really engaged for a long period of time, one, the chances of you using the materials is going to be low, but you're probably not using the materials because you never fully understood or learned it to begin with. And so this is a reason why the engagement and time commitment is pretty high in academy. But in reality, it's not the worst thing in the world. It's just, we're just keeping you thinking about the materials over at least 10 weeks.
A walkthrough of the tutorials
Okay. So I want to actually take you through an example of what you will expect to see. There's going to be some screenshots that I'll talk through, and then at the end, I'll sort of mock up a sort of user to mentor interaction, and that will be in an actual live environment. So as of right now, if you log into academy, this is something that you'll see. This is the landing page. And right now I'm going to go through an example of, let's pretend we're in week four. This week four milestone is about writing functions. And here are my four tutorials that we're going to be talking about in this particular week.
I'm going to pretend I'm going to click the right functions tutorial. And this is what the tutorials actually look like in academy. So we begin with a welcome statement to contextualize the need for writing functions in this particular example. And then we have a page of the next slide will end up being things to think about before you continue, just so just to prime your mind about like, hey, don't forget we're going to end up using this stuff. Don't forget this type of syntax and notation. And then we start the lesson. So yes, there is a bit of prose text involved in getting the lesson started. But we then go into, okay, so here's functions. And here are parts of function behavior and what it can do. And then right away, we try to get you to either see some code or run some code as fast as possible.
So here in the introduction phase, the main goal of we're trying to get you to write your own custom functions. Well, that's really similar. You've worked with functions this entire time. So here's an example of a function you've seen before. We're just going to be able to, instead of random.random, write something that we've written ourselves.
The other thing that we try to do in academy, and this is one of the things that I find really interesting when I first joined, is we don't hide away from showing you error messages. We will literally put an error message in the tutorial and then have you, one, see the actual error message and then talk to you about what the error message means and then have you fix that error message. So here, for example, hey, you're calling random uniform in an incorrect way. This is the actual error message that happens. Here's the actual code for you to go and tinker with to go and fix it.
And so, again, we're trying to break the cycle of you reading a bunch of text and just clicking next because it's so easy to do. And so we either put in these exercises or what's known as formative assessments, just to check that you've actually grasped that little bit of information that we're trying to convey to you.
And then, literally, the next thing that we end up showing in this particular lesson is, oh, here's a mock function that we can write. And so this is just code. So then what we do is we break down the code for you and tell you all of the different components that end up happening. And then from there, we say, okay, let's stop you from reading and let's get you to do something again. Let's just run the function that we just wrote. And so here, this reiterates the process of, hey, remember before when we worked with random.random? Well, that was a function that just existed somewhere that you can run, but we just wrote this function ourselves and you can run it yourself just like every other function.
And then the other style, it's not that every single check-in or formative assessment is going to be a coding example. It's even something as simple as a multiple choice question or true and false question. That's really enough to sort of get you to reiterate or that little bit of practice of what's going on. And so here you see, hey, we're actually calling the function object itself and resaving it. We're not actually telling the function to run or call it. We're just referring to the actual object of the function. And so this is trying to connect or we're trying to build the connections from the earlier weeks of, like, remember how variable assignments were working? Well, we can actually do the same thing with a function if we never actually go about and assign it to a variable.
And so what we also end up doing in our particular example is we add more complexity by adding more input. So that's another thing that happens in this particular tutorial. And then we have another set of formative assessments. So there is really a pattern that's going on here is we try our best to not have you blindly read walls of text just to click continue. We really want to be very active in you tinkering and playing with the code.
And what's also neat that I haven't shown it here in the slides here, but when you go and run some of these assessments, we will show you the error message if there is an actual error message. But if there's a problem with your code or your result, we try to do our best and tell you what you might have typed incorrectly in your code. And so it is sort of like this, like, computer-assisted helper, if you want to think of it that way. It's not an AI tool. It's actually looking at the results and actually looking at the text that you're typing from the code to sort of give you pointers in what went wrong.
The other things that we end up doing is we provide tips. So it's not everything is like a huge talking point that we want to do. And so we sometimes make little call out boxes or like, hey, remember, this is actually a really important thing I want you to remember. So we do have mechanisms to remind you of that information as well. And then there's also some takeaways. So anytime there's like some weirdness with the output that you might not expect, we don't just brush it under the rug. We try to bring it up and just so you understand what's going on.
And so we have these different boxes, and it's mainly for like additional information, just so you know that we know that we understand that what you see might not be what you expect, and this is why. If you understand it because you're a little bit more advanced, then great, you learned a new bit of information. But if you're a brand new beginner, it might be a little bit overwhelming. So that's also why we put different boxes just to be like, hey, this is just a little bit of optional information. If you don't understand this, we can bring this up with your mentor. But just understand that like there's other stuff going on, but this is something that might be useful to you in the future.
And the other thing that we try to do is we try to be very realistic in how you will end up building up code and testing it yourself, and then going back and sort of like rewriting it in a more like nicer, correct way. So this is an example of like, hey, like, yeah, we didn't actually have to do those calculations in separate steps. We could have done all of those calculations in one go, and that's okay as well.
And then what ends up happening is you end up with another format of assessment. And the question is like, hey, does this code block actually produce an error? And then it really allows you the space up here to explore and run the code to be able to answer this question. But what we also end up doing is providing you the explanation. If you don't fully understand what's going on, we do provide you that information. So in this particular case, we're trying to do some set of calculations. We never really expected this to take a list of values, only single values. So that's why there's an error. But again, in Academy style, we give you the place to actually see the mistake and see the error message. Because sometimes these error messages do end up being very cryptic. And so we want the skill, part of the skill that we want you to have is learning how to read these error messages.
So I'll skip ahead in this particular tutorial. Later on in this particular tutorial, we talk about writing functions with multiple parameters. And so here you'll see that like, hey, we've talked about, we've given you all of this function code example. Let's slowly take back bits and pieces of the code and have you actively write it in yourself, right? So from a very super beginner point of view, this is really nice because you don't have to worry about the calculation right now. This particular task is, do you know how to create a function with a particular name? And do you know how to provide multiple inputs to a function that you're writing? We don't care about the stuff down here right now. I don't want you to get bogged down with the calculation. I am currently only concerned with the function signature. And so can you write that? And so we slowly will scaffold away code and just to help build up the example.
And again, this is one style or one method that we can reduce the cognitive load of the learner as they're going through this information. And so if you do something wrong, here's an example of like a piece of output that is very custom and part of the academy like software infrastructure that tries to point to you like, hey, maybe you swap some values around. And so that's one of the experiences that you can get.
And then the last example, I'll skip ahead again. So here's an example of a more summative piece of practice of like, let's incorporate everything that we've learned. And you'll see here like a lot of the code is gone. And so there's very little scaffolding happening. And then if you go through more of the exercises, it just ends up being four underscores for you to be like, write your function from scratch, right? So it really does guide you through and we slowly take away key components for you to be one, like you're very active in this learning process. You have to go and type this stuff in, in order to progress to the next part of the tutorial.
Live demo: a milestone session
And then so when you're done with all of that, let's say I'm done with all of my week's milestones, lessons, I'll go and create this, go and run this actual milestone. So I'll spend the time to go do it. And then we'll meet up at group presentations and I'll talk about it. And so at this point, I will go and demo an actual, what it might feel like as a learner. So right now, currently, I'll play the role as a learner and I will say, and it'll be something like, all right, Daniel, you're up. Let's talk about what you ended up going through today.
So what I'll end up doing is like, and remind, and if you're very new to Python, just know that like technically I'm mocking up a week four experience. So there's might be some stuff if you're very new to Python that you might not understand, but that's sort of part of the demo that I'm giving. All right. So this is my week's milestone. What I did was I loaded up all of the stuff, libraries that we needed to run. And then the first part was to load up this data set. So I used the read underscore CSV function to read in this indices data set and I saved it to this variable called index.
And then here, the task in the milestone, it just asked me to like, write a function that if it took this as input, return this as output. So this is the function that I wrote. I called it read code symbol. It took a thing called symbol. And then like, if it matched all this stuff, I saved it to a variable and at the end, I returned this variable. And then later on in the assignment, it said like, oh, you just used this thing. So what I ended up doing was using that function in apply to the symbols column. And then I got this new column down here that recoded the variables. And then for my extension, what did I end up doing was I wrote this function right here that took the symbol that I provided. So this function took in a data set, a symbol I wanted, a column that I wanted. And if there was a cutoff, greater or equal to, that's what the data frame returned. So that's what I did. It was a piece of code that subset my data frame and returned a subset of data frame. And I ran it like this. So this was my data frame. And then at the end, I got fewer rows. So that's what I expected at the end.
All right. So that's something, that's an example of what a student will present. So I will like pretend I'm another person by swapping out my glasses. And me as a mentor, what would I do? What I would do is I would say, hey, Daniel, that was great. You got through all of the replication bits of our milestone. So you got the beginning bits. So there's some things I kind of want to talk to you about, about your solution. So if you scroll down to where you wrote the definition, yes, on line 56, you see here all of your if statements. The way you wrote this was if symbol is that, set it to a variable, and then that's all great. And we can see that your function is behaving as expected.
The only thing that's sort of not ideal about the function that you're writing with is if you remember the very first tutorial of this week, there was on if statements. What's sort of missing in this function is you using the elif statement and the optional else statement in here as well. Because the way your function is written right now is it needs to go through every single one of your if statement checks, right? So if you had an example, you put in the symbol of caret dji, it would find this, but it's still going through and checking every single other if statement. And so in this particular function that you wrote, probably not a huge performance issue, because it's a very simple calculation. But you can also imagine like if this was, you know, like a 500 million rows, this function, the extra calculation and time this function is taking is going to add up.
And so ideally, I'll just do this, I'll just tell you or walk you through one of them right now. So in line 61, if you turn that if statement into elif, you should be able to run that function again. And it should at least behave properly. And then the rest of your code should be able to run just like before. And it seems like it is. Right? So you eventually want to make all your if statements elif statements, just so it's not going and checking every single one. The way it is going to be written now is the first thing that returns true, that's when it will stop checking the later conditions below. Right? And so it just exits out of checking stuff a little bit earlier. And that could potentially save you a lot of time.
Cool. And then the other thing, if you scroll down to your apply example, on line 87, yep. So what you see here is you use your function using apply on that column called simple. So that's great. The only thing that's missing right here is we wanted you to create a new column called name and you haven't done that. So remember, the way we do that is we sort of pretend that the column name always existed. So you will end up typing at the very beginning of line 87, you will type in indexes. And then you will use a set of pair of square brackets. And then in there, you will put in name. And then you will set that equal to the variable. And then that way, you will get a new column called indexes. And the reason why you're not seeing it is because you just assigned made a change to the data frame. So what you want to do is maybe in a new chunk or below, look at the indices data frame again. So if you scroll down after you rerun it, now you have the name column down there. And then everything with the extension, great job with going back and reviewing some of our week 2 materials and incorporating it into your function.
All right. So that's sort of an example of what a milestone session will feel like. Again, like it's hard to mock this up as one person, but usually I'm saying all of those words and then the learner is actually typing. So also part of that is to get the muscle memory in for writing those bits of code. The other important thing of why I want the learner to write it as well is because they, in the process of writing it, will also make typos. And so you're also, again, forcing them to see the error message of the stuff that they're writing. And a lot of times, if we have time in our group session, I actually let them make the error and I just leave it alone. And then we talk about the error that they typoed that they made as well.
Does Academy work? Results and testimonials
All right. So that's the demo. So now the question is, like, does this whole academy experience work? The short answer is yes, it does. So out of the 600 students that we've gone through the academy experience, 95% have completed academy. And then what's also really nice is I think the denominator is 75. So 75 out of 75 people have said that they have been using academy for work afterwards. And this is four to six months out, I think, is the actual cutoff that we use. So we do have evidence that people are sticking around and using the materials that we're teaching them.
And hopefully, it's from the evidence-based learning that is sort of making that happen. And it's not just us. Some people are talking about this online. So Keith finished with us through Kellogg a couple of months ago. And he said this whole thing was a very great experience. And James Wade from Dow Chemical Company is one of the people that have repeat groups with us. And even they have reported that even six months after, 16 out of 17 say that they still write code. And speaking with him a little bit more in detail about that one person, it's mainly because that one person took on a more managerial role. So they're not coding as much. So things seem to be working really well.
75 out of 75 people have said that they have been using academy for work afterwards. And this is four to six months out, I think, is the actual cutoff that we use.
Q&A
So with that, I'll end here and then sort of just take some questions. Yeah, let's see if I queued up these questions correctly.
I think I did. But good stuff. Two questions off the bat that I saw got upvoted in the Slido, kind of together. One's about pricing and one is about individual learning paths. So pricing. Just in the interest of transparency, I think our pricing is like a few thousand bucks per learner. And it does like scale and adjust depending on the number of learners. So like really the best way to get the most accurate pricing is to talk with our team and for us to understand what your situation is. But like a few thousand bucks per learner is the quote that I think is like reasonable to give.
And then like related to individual learning tracks, like a core part of the Academy experience is group learning. Like we believe in it strongly. So there aren't really individual learning paths right now through the Academy experience. That said, some great resources that we put out like the R for Data Science. I know it's not Python, but R for Data Science. The book is available online. You can see that we're kind of working on the second edition. Highly recommend looking into our PositConf workshops. These are skilling workshops that we offer at PositConf. And you can see that there's like a bunch of different sessions that you can choose from, like really good content taught by experts about specific things. So that's like another option. And then a little bit lighter, like totally free. We have the Data Science Hangout every week, Thursday. You can add it to your calendar, join, and like we'll just talk about things related to data science.
Does the curriculum touch on environments? Oh, the actual curriculum does not touch on environments. Like we use them extensively just to get Academy working. But we haven't really talked about computational environments explicitly in the 10-week program. Having said that, depending on our interaction with you, your company might already have an internal like Kinect server or Workbench server already set up. We don't really set up the environment for you, but the mentor can sometimes help guide you through like setting up stuff like that. It will definitely be more not in the scope of the materials that we're teaching you. But if it's an environment-related question, the mentor might be able to help you answer that. But it's not something we teach explicitly.
It looks like the code is running in a browser. Does the course include help with installing, updating
