bpd.DataFrame.to_numpy¶
-
DataFrame.to_numpy()[source]¶ Convert the DataFrame to a NumPy array.
By default, the dtype of the returned array will be the common NumPy dtype of all types in the DataFrame. For example, if the dtypes are
float16andfloat32, the results dtype will befloat32. This may require copying data and coercing values, which may be expensive.Parameters: None – Returns: df_arr – DataFrame as a NumPy array. Return type: numpy.ndarray