In [11]: df Out[11]: x y 0 a 1 1 b 2 In [12]: df.dtypes Out[12]: x object y object dtype: object In [13]: df.convert_objects(convert_numeric=True) Out[13]: x y 0 a 1 1 b 2 In [14]: df.convert_objects(convert_numeric=True).dtypes Out[14]: x object y int64 dtype: object
http://stackoverflow.com/questions/21197774/assign-pandas-dataframe-column-dtypes
 
                
            
         
                     
                    
                 
                    
                 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号