-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
ENH: add ignore_index option in DataFrame.explode #34933
ENH: add ignore_index option in DataFrame.explode #34933
Conversation
Note that I'm trying to push a commit for the doc strings, but I can't get passed the pre-commit because of |
You can use |
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.
We'll need a release note in 1.1.0.rst and tests.
You should also add the same keyword to Series.explode.
@TomAugspurger added the changes you requested for |
Yep. There should be examples you can base yours off of.
For the release note, this can go in the "Other enhancements" section.
…On Mon, Jun 22, 2020 at 8:51 AM Erfan Nariman ***@***.***> wrote:
@TomAugspurger <https://github.com/TomAugspurger> added the changes you
requested for DataFrame.explod and Series.explode, will look into release
note in 1.1.0.rst and tests. Not really familiar with this so will try
myself first,but if I need help can I ask you some questions?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34933 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKAOIX5QIOYWE3KHDUEXETRX5OPTANCNFSM4OEPYUXA>
.
|
@TomAugspurger I think I added all the requests you had, will check the merge conflict, not sure how this could happen. |
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
…pandas into explode_ignore_index_34932
The new test fails because of differences in types: def test_ignore_index():
# GH 34932
s = pd.Series([[1, 2], [3, 4]])
result = s.explode(ignore_index=True)
expected = pd.Series([1, 2, 3, 4], index=[0, 1, 2, 3])
> tm.assert_series_equal(result, expected)
E AssertionError: Attributes of Series are different
E
E Attribute "dtype" are different
E [left]: object
E [right]: int64 |
@TomAugspurger @jorisvandenbossche I think I made all the changes you guys requested, if there's anything more I can do, please let me know. |
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.
looks good a couple of comments, ping on green.
@erfannariman can you push the changes you made? |
Co-authored-by: Tom Augspurger <TomAugspurger@users.noreply.github.com>
…pandas into explode_ignore_index_34932 Merge upstream into local
Not sure why this change should trigger |
if you can make that change and merge master can get this in |
I think I made all the changes you requested, is there anything else you would like me to do? |
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.
looks good, pls revert the part of the whatsnew that was changed; only your change should be in the diff. ping on green.
The check that fails seems to happen because of merging master, |
thanks @erfannariman very nice |
thanks for reviewing and helping @jreback |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff