Three Pandas Tips for Pandas Noobs

Happy PandaLast 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:

  1. Using inplace=True to make changes stick
  2. Applying a function to a single column of a DataFrame
  3. 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…]