Answers for "get pandas dataframe as numpy array"

0

get pandas dataframe as numpy array

>>> df = pd.DataFrame({"A": [1, 2], "B": [3.0, 4.5]})
>>> df.to_numpy()
array([[1. , 3. ],
       [2. , 4.5]])
Posted by: Guest on May-02-2020

Code answers related to "get pandas dataframe as numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language