-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: pd.merge fail with numpy.uintc on Windows #58713
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
Comments
I have made a pull request on this issue, kindly check |
xref #52451 (comment) |
From #60091 (comment) This issue can be resolved by adding pandas/pandas/core/reshape/merge.py Lines 124 to 126 in 8d2ca0b
However, we should be checking |
Resolution of this issue should also address the |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
This bug is fixed by adding np.uintc to _factorizers in pd.merge. Could someone upload it fixed please?. For me the bug is fixed by adding in line 114 of core/reshape/merge.py file: np.uintc:libhastable.UInt32Factorizer.
Issue Description
Traceback (most recent call last):
File "C:\Users\noname37486\PycharmProjects\pythonProject3\main.py", line 10, in
df3=df1.merge(df2, how = 'outer')
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\frame.py", line 10832, in merge
return merge(
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 184, in merge
return op.get_result(copy=copy)
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 886, in get_result
join_index, left_indexer, right_indexer = self._get_join_info()
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 1151, in _get_join_info
(left_indexer, right_indexer) = self._get_join_indexers()
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 1125, in _get_join_indexers
return get_join_indexers(
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 1740, in get_join_indexers
zipped = zip(*mapped)
File "C:\Users\v\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 1737, in
_factorize_keys(left_keys[n], right_keys[n], sort=sort)
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 2539, in _factorize_keys
klass, lk, rk = _convert_arrays_and_get_rizer_klass(lk, rk)
File "C:\Users\noname37486\PycharmProjects\pythonProject3\venv\lib\site-packages\pandas\core\reshape\merge.py", line 2616, in _convert_arrays_and_get_rizer_klass
klass = _factorizers[lk.dtype.type]
KeyError: <class 'numpy.uintc'>
Installed Versions
INSTALLED VERSIONS
commit : d9cdd2e
python : 3.9.6.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.22631
machine : AMD64
processor : Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : es_ES.cp1252
pandas : 2.2.2
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 57.0.0
pip : 21.1.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: