Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

df to np array

df = pd.DataFrame({"A": [1, 2], "B": [3.0, 4.5]})
>>> df.to_numpy()
array([[1. , 3. ],
       [2. , 4.5]])
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #df #np #array
ADD COMMENT
Topic
Name
9+1 =