Skip to content

Slicing columns with mixed types <str>,<int> fails with ValueError #20975 #38717

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

Merged
merged 8 commits into from
Dec 27, 2020
Merged

Slicing columns with mixed types <str>,<int> fails with ValueError #20975 #38717

merged 8 commits into from
Dec 27, 2020

Conversation

hungyiwu
Copy link
Contributor

@pep8speaks
Copy link

pep8speaks commented Dec 27, 2020

Hello @hungyiwu! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-12-27 13:43:36 UTC

expected = DataFrame(
data=[[2, 3]], index=[0], columns=pd.Index([1, 2], dtype=object)
)
tm.assert_equal(df.loc[:, 1:], expected)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does assert_frame_equal work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that works and modification made accordingly. Thanks!

@hungyiwu
Copy link
Contributor Author

I saw only the travis-ci check failed but when going through its log I couldn't identify the cause. Any suggestions will be appreciated!

@jreback jreback changed the title Issue20975 add test Slicing columns with mixed types <str>,<int> fails with ValueError #20975 Dec 27, 2020
@jreback jreback added the Testing pandas testing functions or related to the test suite label Dec 27, 2020
@mroeschke mroeschke added this to the 1.3 milestone Dec 27, 2020
@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Dec 27, 2020
@jreback jreback merged commit 6d7b1c5 into pandas-dev:master Dec 27, 2020
@jreback
Copy link
Contributor

jreback commented Dec 27, 2020

thanks @hungyiwu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slicing columns with mixed types <str>,<int> fails with ValueError
5 participants