We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
pdf = pd.DataFrame({"z": 1}) pdf.z.sort_values() 2020-12-31 1 2021-01-01 1 2021-01-02 1 2021-01-03 1 2021-01-04 1 .. 2021-04-05 1 2021-04-06 1 2021-04-07 1 2021-04-08 1 2021-04-09 1 Freq: D, Name: z, Length: 100, dtype: int64
This preserves the freq on ubuntu but loses it on Mac
don't know, consistency above everything else
I can't test the nightlies on ubuntu right now, that's why it's only 2.2.2
commit : d9cdd2e python : 3.12.4.final.0 python-bits : 64 OS : Darwin OS-release : 23.3.0 Version : Darwin Kernel Version 23.3.0: Wed Dec 20 21:33:31 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8112 machine : arm64 processor : arm byteorder : little LC_ALL : None LANG : None LOCALE : None.UTF-8
pandas : 2.2.2 numpy : 2.0.0 pytz : 2024.1 dateutil : 2.9.0 setuptools : 70.1.0 pip : 24.0 Cython : None pytest : 8.2.2 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 3.1.4 IPython : 8.25.0 pandas_datareader : None adbc-driver-postgresql: None adbc-driver-sqlite : None bs4 : 4.12.3 bottleneck : None dataframe-api-compat : None fastparquet : None fsspec : 2024.6.0 gcsfs : None matplotlib : None numba : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : 16.1.0 pyreadstat : None python-calamine : None pyxlsb : None s3fs : 2024.6.0 scipy : None sqlalchemy : None tables : None tabulate : None xarray : 2024.6.0 xlrd : None zstandard : None tzdata : 2024.1 qtpy : None pyqt5 : None None
The text was updated successfully, but these errors were encountered:
cc @jbrockmendel thoughts here?
Sorry, something went wrong.
I don't have an ubuntu env ATM, so speculating: sort_values go through nargsort which I suspect may have undefined behavior in non-unique cases.
BTW the example in the OP is not reproducible, needs an index passed to DataFrame.
No branches or pull requests
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
This preserves the freq on ubuntu but loses it on Mac
Expected Behavior
don't know, consistency above everything else
I can't test the nightlies on ubuntu right now, that's why it's only 2.2.2
Installed Versions
INSTALLED VERSIONS
commit : d9cdd2e
python : 3.12.4.final.0
python-bits : 64
OS : Darwin
OS-release : 23.3.0
Version : Darwin Kernel Version 23.3.0: Wed Dec 20 21:33:31 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8112
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 2.2.2
numpy : 2.0.0
pytz : 2024.1
dateutil : 2.9.0
setuptools : 70.1.0
pip : 24.0
Cython : None
pytest : 8.2.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.4
IPython : 8.25.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.3
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : 2024.6.0
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 16.1.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : 2024.6.0
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : 2024.6.0
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None
None
The text was updated successfully, but these errors were encountered: