-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Error with pivot_table and categorical data when add dropna args in version 0.23 #21133
Labels
Categorical
Categorical Data Type
Regression
Functionality that used to work in a prior pandas version
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
Comments
diegogarcilazo
changed the title
Pandas error with pivot_table and categorical data when add dropna args in version 0.23
Error with pivot_table and categorical data when add dropna args in version 0.23
May 19, 2018
gfyoung
added
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Categorical
Categorical Data Type
labels
May 21, 2018
@diegogarcilazo : Thanks for reporting this! Did this behavior work in a previous version of |
@diegogarcilazo pls edit the top to show the output |
jorisvandenbossche
added
the
Regression
Functionality that used to work in a prior pandas version
label
May 24, 2018
@diegogarcilazo Thanks for the example. I made a simplified version that also illustrates the regression:
For that last one, the correct output on 0.22:
|
jreback
added a commit
to jreback/pandas
that referenced
this issue
May 29, 2018
jreback
added a commit
to jreback/pandas
that referenced
this issue
May 31, 2018
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jun 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Categorical
Categorical Data Type
Regression
Functionality that used to work in a prior pandas version
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
When entering the argument dropna = False with the function pivot_table the value and order of the categories is correct. But when dropna = True both the order and the value of the categories do not perform as expected, add a NaN category and drop last category. With other dataset w/o NaN values dropna = True causes categories lose coherence with the values.
The same goes for the pd.crosstab () function
pandas: 0.23.0
pytest: 3.5.1
pip: 10.0.1
setuptools: 39.1.0
Cython: 0.28.2
numpy: 1.14.2
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.4.0
sphinx: 1.7.4
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: 1.2.1
tables: 3.4.3
numexpr: 2.6.5
feather: 0.3.1
matplotlib: 2.2.2
openpyxl: 2.5.3
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.4
lxml: 4.2.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.7
pymysql: None
psycopg2: 2.7.1 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: