Sunday, September 16, 2012

Biting Pythons

There, I went ahead and used the obligatory python-pun. I'm sure everyone learning or using Python is required to do this at some point or another. I'm glad I got it out of the way.

So I poured right into the Pandas documentation and tried to run through their examples with some of the data that I have. Almost immediately I ran into a a bug in panda's date_converter. I think anyway. I'm always really skeptical that I have found an actual bug and think instead I am probably just doing something wrong. Still, this case seems pretty straight-forward. So, me thinks, I'll just hop into the code and edit it some. Yay open source! And that's when the biting started.

Part of my whole problem with python has been just learning the ecosystem. Lately I've been spoiled with perlbrew, cpanm, and local::lib and foolishly started using python without looking for equivalents. So, not only was my python3.2 tied up with the system but all my modules were going into /usr/local/. I was tempted to work around this but figured since I am really at the beginning of using python I would start it over and use pythonbrew which supports venv (virtualenv). Then I can use pip (I think this is what the cool kids are using these days as opposed to easy_install) and that means I can hack on the pandas. So, like all things, what was going to be a two minute bug fix now involves re-building my whole environment. :)

Looking at Pandas, however, it looks like it will be a great boon. Obviously, since it is designed specifically for what I am doing, it has a lot of features I can utilize. Actually, the entire script I have so far can probably be reduced to about three lines.

No comments:

Post a Comment