-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
DataFrameDataFrame data structureDataFrame data structureIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesWarningsWarnings that appear or should be added to pandasWarnings that appear or should be added to pandas
Milestone
Description
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Assigning a multi-column DataFrame to a single column does not raise an error and simply assigns the first column of the DataFrame to the column. Below is an example:
df1 = pd.DataFrame({'a': [0, 1, 2, 3], 'b': [4, 5, 6, 7]})
df2 = pd.DataFrame({'c': [8, 9, 10, 11], 'd': [12, 13, 14, 15]})
df1['b'] = df2
This seems like one of the instances where not raising an error might ease some short-term pain but could mask underlying issues with a user's code. This behavior seems to have been around for a while. It occurs in master and as far back as 1.0.3.
Metadata
Metadata
Assignees
Labels
DataFrameDataFrame data structureDataFrame data structureIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesWarningsWarnings that appear or should be added to pandasWarnings that appear or should be added to pandas
Activity