Skip to content

BUG? Consistency of column parsing #11357

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

Open
chris-b1 opened this issue Oct 17, 2015 · 1 comment
Open

BUG? Consistency of column parsing #11357

chris-b1 opened this issue Oct 17, 2015 · 1 comment
Labels
API - Consistency Internal Consistency of API/Behavior Bug IO CSV read_csv, to_csv IO Excel read_excel, to_excel

Comments

@chris-b1
Copy link
Contributor

chris-b1 commented Oct 17, 2015

xref #11328

In [100]: df = pd.DataFrame({0: range(5), 1:range(5)})

In [101]: df.to_excel('tmp.xlsx')

In [102]: df.to_csv('tmp.csv')

In [103]: pd.read_excel('tmp.xlsx', index_col=0).columns
Out[103]: Int64Index([0, 1], dtype='int64')

In [106]: pd.read_csv('tmp.csv', index_col=0).columns
Out[106]: Index([u'0', u'1'], dtype='object')
@jreback jreback added IO Data IO issues that don't fit into a more specific label API Design IO CSV read_csv, to_csv IO Excel read_excel, to_excel labels Oct 18, 2015
@jreback
Copy link
Contributor

jreback commented Oct 18, 2015

I think csv should infer this, though wonder how much code this would break. can you see in the existing suite how much?

@jbrockmendel jbrockmendel added API - Consistency Internal Consistency of API/Behavior and removed API Design labels Dec 19, 2019
@mroeschke mroeschke added Bug and removed IO Data IO issues that don't fit into a more specific label labels May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API - Consistency Internal Consistency of API/Behavior Bug IO CSV read_csv, to_csv IO Excel read_excel, to_excel
Projects
None yet
Development

No branches or pull requests

4 participants