-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Incompatible tolerance error in merge_asof with comaptible types. #35558
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
Thanks for the report. Looks like a bad substitution at https://github.com/pandas-dev/pandas/pull/31556/files#diff-14fc0a514ad9ce2a73eeaa9ec3fb9406R1647. In pandas/pandas/core/reshape/merge.py Line 1670 in 3701a9b
we should change the |
can confirm that before changes in #31556 was giving expected output
|
May I take the issue? |
go for it @ikedaosushi . will also need a test. maybe need to simplify code sample. |
Thanks. I understand. I'm gonna write it as well as fixing. |
Co-authored-by: Yutaro Ikeda <[email protected]>
[X ] I have checked that this issue has not already been reported.
[X ] I have confirmed this bug exists on the latest version of pandas.
Crashes in 1.1.0, but works in 1.0.5
[X ] (optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Problem description
When trying to use
merge_asof
in 1.1.0 (and in master), I get message about "incompatible tolerance" even though I'm usingpandas.DatetimeIndex
andpandas.Timedelta
for the tolerance.Well, technically, I actually get
UnbondLocalError
because a local variable is referenced before assignment while trying to generate the error message, but it looks like the underlying problem is something to do with an incompatible tolerance error.Here's the traceback:
Expected Output
Here's what I get in version 1.0.4, and what I think I should get.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : a4203cf
python : 3.8.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-7634-generic
Version : #38
159534531720.04~a8480ad-Ubuntu SMP Wed Jul 22 15:13:45 UTCmachine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.0.dev0+29.ga4203cf8d
numpy : 1.19.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 49.2.0.post20200714
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.16.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
I hope I did this right. Just trying to help. Thanks.
The text was updated successfully, but these errors were encountered: