Issue
I have the following numpy array..
In[48]: idx
Out[48]: (array([223, 226, 445, 494, 546, 696, 702, 713, 725, 749], dtype=int64),)
Can anyone tell me how I convert this into a list or another dataframe? I've tried the tolist() function but it doesn't work, it gives the error ''tuple' object has no attribute 'tolist'
Solution
Try idx[0].tolist()
, your array is encapsulated in a tuple.
Answered By - mozway
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.