wesm/pandas — Issue #622: pandas converts int32 to int64
Author: gdementen
Created: 2012-01-13 14:11:51+00:00
State: open

Is this intended? I had hoped no copying at all would happen in that case.

In [65]: a = np.random.randint(10, size=1e6)

In [66]: a.dtype
Out[66]: dtype('int32')

In [67]: b = np.random.randint(2, size=1e6)

In [68]: df = pandas.DataFrame({'a': a, 'b': b})

In [69]: df.dtypes
Out[69]:
a int64
b int64