r/pythontips • u/misha_sv • May 02 '21
Python3_Specific Convert Pandas DataFrame to NumPy Array in Python
Learn how to easily convert Pandas DataFrame to NumPy array in Python.
https://pyshark.com/convert-pandas-dataframe-to-numpy-array-in-python/
28
Upvotes
1
u/Just-A-abnormal-Guy May 02 '21
I only know this following before read this: data= df.values.reshape() with whatever shape you want
7
u/automated_care May 02 '21
np.asarray