-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: concat column order behaviors changes after 1.4 #47127
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
Related first commit: 01b8d2a |
Thanks @Yikun for the report.
in
and the code a few lines later
|
Previous `pandas` behavior prior to 1.4.3 [did not sort numeric column names](pandas-dev/pandas#47127), but this now occurs. We don't sort within other parsers, so switching this flag to be consistent with previous behavior. There is no clear reason sorting is necessary here.
* Fix #200 * Set namd parser column sorting to False Previous `pandas` behavior prior to 1.4.3 [did not sort numeric column names](pandas-dev/pandas#47127), but this now occurs. We don't sort within other parsers, so switching this flag to be consistent with previous behavior. There is no clear reason sorting is necessary here. Co-authored-by: David Dotson <[email protected]>
…low 1.4.3 behavior ### What changes were proposed in this pull request? Respect Series.concat sort parameter when `num_series == 1` to follow 1.4.3 behavior. ### Why are the changes needed? In #36711, we follow the pandas 1.4.2 behaviors to respect Series.concat sort parameter except `num_series == 1` case. In [pandas 1.4.3](https://github.com/pandas-dev/pandas/releases/tag/v1.4.3), fix the issue pandas-dev/pandas#47127. The bug of `num_series == 1` is also fixed, so we add this PR to follow panda 1.4.3 behavior. ### Does this PR introduce _any_ user-facing change? Yes, we already cover this case in: https://github.com/apache/spark/blob/master/python/docs/source/migration_guide/pyspark_3.3_to_3.4.rst ``` In Spark 3.4, the Series.concat sort parameter will be respected to follow pandas 1.4 behaviors. ``` ### How was this patch tested? - CI passed - test_concat_index_axis passed with panda 1.3.5, 1.4.2, 1.4.3. Closes #37217 from Yikun/SPARK-39807. Authored-by: Yikun Jiang <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
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
concat column order behaviors changes after 1.4
Expected Behavior
Installed Versions
1.4+
The text was updated successfully, but these errors were encountered: