-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Comparison of categorical with tuple generates wrong results #18050
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
Labels
Categorical
Categorical Data Type
good first issue
Needs Tests
Unit test(s) needed to prevent regressions
Milestone
Comments
Can you have a look at pandas/pandas/core/categorical.py Line 49 in 4578a03
|
pandas/pandas/core/categorical.py Line 113 in 4578a03
|
We'll need to be a bit careful with the fix here, to avoid ambiguity with
- elements of categories are scalars, comparing vs. an array-like
- elements of categories are array-like, comparing vs. a scalar
- elements of categories are array-like, comparing vs. an array-like
…On Tue, Oct 31, 2017 at 8:05 AM, yakupberk-sbg ***@***.***> wrote:
is_scalar returns False and it goes to else
https://github.com/pandas-dev/pandas/blob/4578a039e95a18b453baf1e6d409b1
c4a51aa238/pandas/core/categorical.py#L113
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18050 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIrcf9ekhPHD2h69L11zt4ojrPJEbks5sxxr_gaJpZM4QMqGH>
.
|
Looks to work on master now. Could use a test
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Categorical
Categorical Data Type
good first issue
Needs Tests
Unit test(s) needed to prevent regressions
Problem description
Result of
s == (0, 0)
ands.astype('category') == (0, 0)
should be same if(0, 0)
is a category.Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 2.7.10.final.0
python-bits: 64
OS: Darwin
OS-release: 17.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.21.0
pytest: 3.2.3
pip: 9.0.1
setuptools: 36.5.0
Cython: 0.26
numpy: 1.13.3
scipy: 0.19.1
pyarrow: None
xarray: None
IPython: 5.5.0
sphinx: 1.6.3
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: None
tables: 3.4.2
numexpr: 2.6.2
feather: None
matplotlib: 2.0.2
openpyxl: 2.4.8
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: