Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
pivot_table over Categorical columns #15193
Comments
|
we had this exact discussion here: #12298 with a categorical
as object
so responding to your points
I suppose this is a bug as this is the point of
this is by definition and the point of a categorical, you get all of the categories. furthermore these are specifically ordered.
not sure what you mean here |
jreback
added Categorical Reshaping
labels
Jan 23, 2017
|
So I think that we can mark this as a bug w.r.t. point 1 above, IOW, |
jreback
added Bug Difficulty Intermediate Effort Medium Missing-data
labels
Jan 23, 2017
jreback
added this to the
0.20.0
milestone
Jan 23, 2017
verhalenn
commented
Feb 23, 2017
|
Would you be opposed to a simple
added to the end of the function? It passes all current tests. |
|
@verhalenn that might work. of course need new tests as well. |
verhalenn
referenced
this issue
Feb 26, 2017
Closed
BUG: pivot_table over Categorical Columns #15511
jreback
closed this
in ed2a2e4
Mar 4, 2017
AnkurDedania
added a commit
to AnkurDedania/pandas
that referenced
this issue
Mar 21, 2017
|
|
+ AnkurDedania |
ef9a93a
|
Kevin-McIsaac commentedJan 22, 2017
Code Sample, a copy-pastable example if possible
Problem description
When the column is a Categorical the output of pivot_table
This was not the behaviour in earlier versions (18?)
Expected Output
Should be the same as the output when the column is not a categorical
Station Kings Cross Station Newtown Station Parramatta Station
Date
2017-01-01 0 1 2
2017-02-01 3 4 5
2017-03-01 6 7 8
Output of
pd.show_versions()pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.11.3
scipy: 0.18.1
statsmodels: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.2.0
tables: 3.3.0
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.2
bs4: 4.5.3
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.1.4
pymysql: None
psycopg2: 2.6.2 (dt dec pq3 ext lo64)
jinja2: 2.9.4
boto: 2.45.0
pandas_datareader: None