BUG: drop_duplicates raises FutureWarning after resetting index #49657
Labels
Closing Candidate
May be closeable, needs more eyeballs
Warnings
Warnings that appear or should be added to pandas
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
I get the following warning:
Expected Behavior
Internally, the changing of the index and subsequent checks for dropping shouldn't raise a FutureWarning, but rather adopt the future behavior by default.
Installed Versions
/home/tkoehne/apps/miniconda3/envs/testpd/lib/python3.10/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
INSTALLED VERSIONS
commit : ca60aab
python : 3.10.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.18.0-348.2.1.el8_5.x86_64
Version : #1 SMP Mon Nov 8 13:30:15 EST 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.4
numpy : 1.23.3
pytz : 2022.1
dateutil : 2.8.2
setuptools : 65.5.0
pip : 22.2.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
bs4 : None
bottleneck : 1.3.5
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
markupsafe : None
matplotlib : None
numba : None
numexpr : 2.8.3
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: