BUG: pivot_table may raise TypeError without values #14380

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

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 added this to the 0.19.1 milestone Oct 8, 2016

codecov-io commented Oct 8, 2016 edited

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

Contributor

jreback commented Oct 19, 2016

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

Member

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 closed this in 921ce47 Oct 20, 2016

Contributor

jreback commented Oct 20, 2016

thanks @sinhrks

sinhrks deleted the sinhrks:pivot_table_bug branch Oct 20, 2016

@tworec tworec added a commit to RTBHOUSE/pandas that referenced this pull request Oct 21, 2016

@sinhrks @tworec sinhrks + tworec BUG: pivot_table may raise TypeError without values
``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
1a46103

@jorisvandenbossche jorisvandenbossche added a commit that referenced this pull request Nov 1, 2016

@sinhrks @jorisvandenbossche sinhrks + jorisvandenbossche BUG: pivot_table may raise TypeError without values
``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)
4ac3295

@amolkahat amolkahat added a commit to amolkahat/pandas that referenced this pull request Nov 26, 2016

@sinhrks @amolkahat sinhrks + amolkahat BUG: pivot_table may raise TypeError without values
``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
b091cfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment