-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: assert_series_equal does not compare indices exactly #50473
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
For The most obvious solution is to use I recommend closing this issue. |
Does it really make sense to have assert_almost_equal on the index regardless? |
I guess that only for a small minority of tests would it be right to compare indices approximately but I cannot point out even one such test. One could argue for |
Or perhaps a separate flag check_index_exact that defaults to True and gets passed through to assert_index_equal? |
Thanks for the bug report, @jaapaap79. This is a duplicate of #40719. I suggest continuing the discussion there. |
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
Issue Description
Does not raise even though index is different
Expected Behavior
Raise because index is different
Installed Versions
pandas : 1.5.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
setuptools : 63.4.1
pip : 22.1.2
Cython : None
pytest : 7.1.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.8.0
html5lib : None
pymysql : None
psycopg2 : 2.9.1
jinja2 : 2.11.3
IPython : 8.5.0
pandas_datareader: 0.10.0
bs4 : None
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2022.8.2
gcsfs : None
matplotlib : 3.5.1
numba : None
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 9.0.0
pyreadstat : None
pyxlsb : None
s3fs : 2022.8.2
scipy : 1.7.1
snappy : None
sqlalchemy : 1.3.24
tables : None
tabulate : 0.9.0
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
zstandard : None
tzdata : None
The text was updated successfully, but these errors were encountered: