-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
BUG: Ordering of columns
is not preserved in pd.read_orc
#47944
Comments
I think this may be an issue with Pyarrow. I'll raise an issue there to see if this is expected behavior
|
Looks like the resolution is from the above issue was to add a note in the doc that order is not guaranteed to be preserved when passing We can mirror this note in |
Hey, I would like to take this up |
@mroeschke is it just about adding a note like
to I see @grtcoder is working on multiple issues ATM. Perhaps I could take this? It would be my first contribution to Pandas. |
Correct. Yeah anyone is welcome to open up a pull request to tackle this issue |
take |
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
The ordering of columns in the output is being respected in
pd.read_parquet
but not inpd.read_orc
.Expected Behavior
The expected behavior is the columns in the output dataframe are in the same order of
columns
Installed Versions
INSTALLED VERSIONS
commit : e8093ba
python : 3.9.13.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-76-generic
Version : #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.3
numpy : 1.22.4
pytz : 2022.1
dateutil : 2.8.2
setuptools : 63.3.0
pip : 22.2.1
Cython : 0.29.32
pytest : 7.1.2
hypothesis : 6.47.1
sphinx : 5.1.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.4.0
pandas_datareader: None
bs4 : 4.11.1
bottleneck : None
brotli :
fastparquet : None
fsspec : 2022.7.1
gcsfs : None
markupsafe : 2.1.1
matplotlib : None
numba : 0.55.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 8.0.1
pyreadstat : None
pyxlsb : None
s3fs : 2022.7.1
scipy : 1.9.0
snappy :
sqlalchemy : 1.4.39
tables : None
tabulate : 0.8.10
xarray : None
xlrd : None
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: