-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves
Milestone
Description
I find it convenient to store lists or series as elements in a dataframe. However, it seems panda gets confused if the iterable is the same length as the number of rows in the dataframe. Here's a minimal example:
matchmat_test = pd.DataFrame(index=[0,1],
columns=[1], dtype=list)
matchmat_test.ix[0,0] = [1,2,3]Returns:
0
0 [1, 2, 3]
1 NaN
If we then assign to the same element again:
matchmat_test.ix[0,0] = [1,2]we get:
0
0 1
1 2
Metadata
Metadata
Assignees
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves