-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix issue with inserting duplicate columns in a dataframe (#14291) #14431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Current coverage is 85.25% (diff: 100%)@@ master #14431 diff @@
==========================================
Files 140 140
Lines 50655 50655
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 43185 43185
Misses 7470 7470
Partials 0 0
|
Parameters | ||
---------- | ||
keys : object | ||
value : int, Series, or array-like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int -> scalar
keys : object | ||
value : int, Series, or array-like | ||
broadcast : bool | ||
Indicates whether all columns with the given key should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not obvious what you mean here. pls reword. (also this is not typically what broadcast
means)
Parameters | ||
---------- | ||
keys : object | ||
value : int, Series, or array-like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
|
||
Notes | ||
----- | ||
The "broadcast" parameter was added to match the method signature of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then don't add it, just use **kwargs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear, you want **kwargs for SparseDataFrame._sanitize_column and an optional parameter for DataFrame._sanitize_column? Should I add *args too so there's no risk of error if someone calls _sanitize_column without specifying the optional argument name?
key
isn't used in SparseDataFrame._sanitize_column either. Do you want me to get rid of that, too?
---------- | ||
key : object | ||
value : scalar, Series, or array-like | ||
propagate : bool, default True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no broadcast
is the correct name. I just wanted the explanation to be what you have now.
This looks good to me (restarted the failing mac build on travis, should be unrelated) |
@paul-mannino Can you rebase (there is a merge conflict, probably in the whatsnew file) |
thanks! |
…olumns in a dataframe closes pandas-dev#14291 closes pandas-dev#14431 (cherry picked from commit 2e77536)
git diff upstream/master | flake8 --diff
Resubmitting PR (@jorisvandenbossche)