Last week after my talk at Data Science DC on how to create your first predictive model in Python, a fellow meetup member asked me about using Pandas for some data engineering work he was doing. In short, his DataFrame didn't seem to be applying the changes he was attempting to make. After a bit of conversation I found out he was missing three key pieces of functionality in Pandas:
- Using inplace=True to make changes stick
- Applying a function to a single column of a DataFrame
- Applying a function that takes arguments to a DataFrame
While the Pandas documentation is very good, it isn't 100% clear on how to use this functionality. So to help him, and to help you, I've created an iPython Notebook which shows you how to do all of this!
Get the code below, and leave any questions you have in the comments section. [Read more…]