Answers for "how to convert 2d array to dataframe to 1d in python"

R
-1

how to convert pandas series to 2d numpy array

a = np.array(s.values.tolist())
print (a)
[[ 0.  0.]
 [ 0.  0.]
 [ 0.  0.]
 [ 0.  0.]
 [ 0.  0.]]
Posted by: Guest on July-11-2020
0

4D Array To DF

pd.DataFrame(arr, columns = ['mode', 'x', 'y', 'z', 'val'])
Posted by: Guest on June-16-2021

Code answers related to "how to convert 2d array to dataframe to 1d in python"

Browse Popular Code Answers by Language