wesm/pandas — Issue #621: DataFrame constructor speed
Author: dieterv77
Created: 2012-01-12 21:13:05+00:00
State: open

Hi, i was playing around with constructing DataFrame's from nested dicts, and noticed that things have gotten a bit slower since v0.6.1.

Here's some sample code i was playing with:

import time
import pandas

print pandas.__version__

data = dict((i,dict((j,float(j)) for j in xrange(100))) for i in xrange(5000))
t0 = time.time(); df = pandas.DataFrame(data); t1 = time.time(); print t1 - t0

With version 0.6.1, the printed time is about 0.21s on my machine, with a little help from git bisect,
i found that:

commit f3ca67dc371ce46589e6a1598168cddcc1b8cb6b takes it from 0.21s to 0.44s
commit 9d65e8e77b675ce4774b6f394acd8f74bd40af78 takes it from 0.44s to 0.54s

It's possible that some of these were unavoidable considering they may have been necessary bugfixes, but i wanted to
see if anyone else is seeing this too.

environment info: 64bit ubuntu 11.10, python2.7, numpy 1.6.1, cython 0.15.1