Skip to content

BUG: Don't error when usecols is a numpy array #14055

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

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Aug 20, 2016

Converts usecols to a set just like we do on the C engine side.

Closes #12546.

self.usecols = _validate_usecols_arg(kwds['usecols'])
if self.usecols is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

I would do this inside the validate

Copy link
Member Author

@gfyoung gfyoung Aug 20, 2016

Choose a reason for hiding this comment

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

Fair enough. Also, it's simpler. Done.

@codecov-io
Copy link

codecov-io commented Aug 20, 2016

Current coverage is 85.26% (diff: 100%)

Merging #14055 into master will increase coverage by <.01%

@@             master     #14055   diff @@
==========================================
  Files           139        139          
  Lines         50386      50387     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42959      42960     +1   
  Misses         7427       7427          
  Partials          0          0          

Powered by Codecov. Last update 51b20de...fe166b7

@gfyoung
Copy link
Member Author

gfyoung commented Aug 20, 2016

@jreback : Simplified the patch, and Travis is still happy. Ready to merge if there is nothing else.

@jorisvandenbossche jorisvandenbossche added this to the 0.19.0 milestone Aug 21, 2016
@jorisvandenbossche jorisvandenbossche merged commit ae4ffac into pandas-dev:master Aug 21, 2016
@jorisvandenbossche
Copy link
Member

@gfyoung Thanks!

@gfyoung gfyoung deleted the np-array-usecols branch August 21, 2016 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants