0

Which type of objects can I use to create a Pandas series? Reading the documentation apparently any array-like object can be used as input. I would have thought that a numpy ndarray object is array-like, but apparently it isn't, as the code below shows.

pd.Series([[2,3],[5,6]]) #ok

ar = np.array([[2,3],[5,6]])
pd.Series(ar) #throws exception
user38525
  • 3
  • 3

0 Answers0