pandas.DataFrame.values

DataFrame.values

Convert the frame to its Numpy-array matrix representation. Columns are presented in sorted order unless a specific list of columns is provided.

NOTE: the dtype will be a lower-common-denominator dtype (implicit upcasting)

that is to say if the dtypes (even of numeric types) are mixed, the one that accomodates all will be chosen use this with care if you are not dealing with the blocks

e.g. if the dtypes are float16,float32 -> float32
float16,float32,float64 -> float64 int32,uint8 -> int32
Parameters :

columns : array-like

Specific column order

Returns :

values : ndarray

If the DataFrame is heterogeneous and contains booleans or objects, the result will be of dtype=object