I cannot reproduce this behavior with Pandas 0.15.1.
>>> pd.__version__ '0.15.1' >>> df = pd.DataFrame({"age": [1,8]}) >>> df age 0 1 1 8 >>> df.dtypes age int64 dtype: object >>> df.loc[1, "age"] 8 >>> type(df.loc[1, "age"]) <type 'numpy.int64'>
Spontaneously, I could not find the corresponding entry in the change lists, but we may want to find out if you are using 0.15.0 or something new.
Edit:
Adding another column with a float type really causes the row data type to become normalized to float (as indicated in his answer as ajcr):
>>> df = pd.DataFrame({"age": [1, 8], "greatness": [0.2, 1.7]}) >>> type(df.loc[1, "age"]) <type 'numpy.float64'>
source share