Will it Python? Machine Learning for Hackers, Chapter 1, Part 4: Data aggregation and reshaping.

UPDATE 1/15/2014: This blog is no longer in service.

This post is now located at: http://slendermeans.org/ml4h-ch1-p4.html

Thanks,
-c.

Advertisements
This entry was posted in Will it Python and tagged , , . Bookmark the permalink.

4 Responses to Will it Python? Machine Learning for Hackers, Chapter 1, Part 4: Data aggregation and reshaping.

  1. I really liked your stack/unstack trick for filling in missing zeros. Great idea!

    I’m looking forward to the matplotlib adventure. Good luck!

  2. Miki Tebeka says:

    Very cool, thanks for sharing.

    Note that Pandas have great facilities to playing with time (see http://pandas.pydata.org/pandas-docs/dev/timeseries.html), you can generate ym_list by doing:
    ym_list = date_range(ufo_us[‘year_month’].min(), ufo_us[‘year_month’].max(), ‘MS’)

    (where ‘MS’ stands for “Month Start”)

    • Carl says:

      Pandas time-series methods are quite rad (and much better than fiddling with standard library date/time modules). Unfortunately I wrote this code back before they were added to Pandas (which I think was around 0.8 or 0.9). One of the neat things I’ve noticed going through this (and taking so long to do so), is that new features keep coming up in these libraries and the code I’m writing now is different than what I would have written 6-8 months ago. I would be pysched to see someone go back and write improved versions of these older project. I unfortunately don’t have the time.

  3. Pingback: tapply in Python | Statistics a.e.

Comments are closed.