From the course: Data Analysis with Python and Pandas

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: map() and assign()

Solution: map() and assign()

- [Instructor] All right, everybody. Our solution code is up on the right. Let's go ahead and dive into the notebook. So the first thing we needed to do was drop the columns that we created in the prior two assignments. So all six of these columns, you could have done this inplace as well. I ended up making sure I was dropping the right columns and then assigning this to overwrite the existing transactions DataFrame. But doing this inplace is just as effective. But we should end up with a DataFrame that looks like this. Depending on if you reran the rename step in, I think, assignment seven, you may have just had a column called transactions here, but hopefully, we're able to identify that. That's one of the things we have to be careful with when we start developing these long workflows, is making sure we rerun things in order. But if you just had transactions, your solution code, will just look a little bit different than mine. So anyways, we're starting with this three column…

Contents