pandas.DataFrame.to_numpy — pandas 1.3.5 documentation
pandas.pydata.org › pandaspandas.DataFrame.to_numpy¶ DataFrame. to_numpy (dtype = None, copy = False, na_value = NoDefault.no_default) [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 float16 and float32, the results dtype will be float32. This may require copying data and coercing values, which may be expensive.