-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: merging with a boolean/int categorical column #17187
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
Milestone
Comments
@lvphj : Thanks for the issue! I don't see why this shouldn't work given that only the |
something odd going on in the actual merge. If we replace the boolean with strings it is ok; with ints looks like some odd type mapping.
|
jdrudolph
pushed a commit
to jdrudolph/pandas
that referenced
this issue
Oct 10, 2017
jdrudolph
pushed a commit
to jdrudolph/pandas
that referenced
this issue
Oct 10, 2017
4 tasks
jreback
pushed a commit
that referenced
this issue
Oct 14, 2017
* BUG: merging with a boolean/int categorical column #17187
ghost
pushed a commit
to reef-technologies/pandas
that referenced
this issue
Oct 16, 2017
* BUG: merging with a boolean/int categorical column pandas-dev#17187
alanbato
pushed a commit
to alanbato/pandas
that referenced
this issue
Nov 10, 2017
* BUG: merging with a boolean/int categorical column pandas-dev#17187
No-Stream
pushed a commit
to No-Stream/pandas
that referenced
this issue
Nov 28, 2017
* BUG: merging with a boolean/int categorical column pandas-dev#17187
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code Sample, a copy-pastable example if possible
Problem description
This problem was asked on StackOverflow at https://stackoverflow.com/questions/45538092/merging-pandas-dataframes-containing-a-categorical-variable-fails-with-valueerr where it was suggested that it was a bug.
Two dataframes containing different columns can be combined using the pandas.merge() method. This works well but in the above example, converting one of the columns in the dataframe to a categorical variable causes the method to fail with error:
Using df.ndim() indicates that both dataframes have 2 dimensions.
Expected Output
The expected output can be generated simply by commenting out the second line in the above code, the line that converts one of the columns to a categorical variable.
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 3.4.1.final.0
python-bits: 64
OS: Darwin
OS-release: 15.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
pandas: 0.20.1
pytest: None
pip: 9.0.1
setuptools: 34.1.0
Cython: None
numpy: 1.12.1
scipy: 0.16.1
xarray: None
IPython: 4.1.1
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 1.5.3
openpyxl: 2.4.7
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: 0.7.11.None
psycopg2: None
jinja2: 2.8
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: