Skip to content

BUG: pivot_table may raise TypeError without values #14380

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

Closed
wants to merge 1 commit into from

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Oct 8, 2016

  • tests added / passed
  • passes git diff upstream/master | flake8 --diff
  • whatsnew entry

pivot_table raises TypeError when index or columns is array-like and values is not specified.

df = pd.DataFrame({'A': [1, 2, 3, 4, 5]},
                  index=pd.DatetimeIndex(['2011-01-01', '2011-02-01', '2011-01-02', '2011-01-01', '2011-01-02']))
df.pivot_table(index=df.index.month, columns=df.index.day)
# TypeError: unhashable type: 'numpy.ndarray'

@sinhrks sinhrks added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Oct 8, 2016
@sinhrks sinhrks added this to the 0.19.1 milestone Oct 8, 2016
@codecov-io
Copy link

codecov-io commented Oct 8, 2016

Current coverage is 85.25% (diff: 100%)

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

@@             master     #14380   diff @@
==========================================
  Files           140        140          
  Lines         50631      50636     +5   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43166      43172     +6   
+ Misses         7465       7464     -1   
  Partials          0          0          

Powered by Codecov. Last update c31ea34...be426db

@sinhrks sinhrks force-pushed the pivot_table_bug branch 3 times, most recently from ef231e2 to 95830ee Compare October 13, 2016 21:41
@jreback
Copy link
Contributor

jreback commented Oct 19, 2016

@sinhrks I think close and open a new PR. the pydata -> pandas-dev changed caused which things.

@sinhrks
Copy link
Member Author

sinhrks commented Oct 20, 2016

thx for the notice. The branch status has been updated properly without re-issuing the PR. Pls take a look when you have a time.

@jreback jreback closed this in 921ce47 Oct 20, 2016
@jreback
Copy link
Contributor

jreback commented Oct 20, 2016

thanks @sinhrks

@sinhrks sinhrks deleted the pivot_table_bug branch October 20, 2016 11:46
tworec pushed a commit to RTBHOUSE/pandas that referenced this pull request Oct 21, 2016
``pivot_table`` raises TypeError`` when ``index`` or ``columns`` is array-like and
``values`` is not specified.

Author: sinhrks <sinhrks@gmail.com>

Closes pandas-dev#14380 from sinhrks/pivot_table_bug and squashes the following commits:

be426db [sinhrks] BUG: pivot_table may raise TypeError without values
jorisvandenbossche pushed a commit that referenced this pull request Nov 1, 2016
``pivot_table`` raises TypeError`` when ``index`` or ``columns`` is array-like and
``values`` is not specified.

Author: sinhrks <sinhrks@gmail.com>

Closes #14380 from sinhrks/pivot_table_bug and squashes the following commits:

be426db [sinhrks] BUG: pivot_table may raise TypeError without values

(cherry picked from commit 921ce47)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants