Skip to content
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

Change default column names in read_* functions when header=False #2000

Closed
wesm opened this issue Oct 1, 2012 · 7 comments
Closed

Change default column names in read_* functions when header=False #2000

wesm opened this issue Oct 1, 2012 · 7 comments
Milestone

Comments

@wesm
Copy link
Member

wesm commented Oct 1, 2012

In retrospect I think using R's convention of X.1, ..., X.N was a bad move. Maybe range(N) would be better? Will cause API breakage but not the end of the world

@wesm
Copy link
Member Author

wesm commented Oct 1, 2012

@changhiskhan do you have an opinion?

@jseabold
Copy link
Contributor

jseabold commented Oct 1, 2012

FWIW, I don't like the dots because you lose attribute access, but I do like the X. I believe we grab and use the column names in statsmodels.

@changhiskhan
Copy link
Contributor

I think the API breakage will be worth it in exchange for attribute access.
Maybe just X1 .... XN or X_1 ... X_N?

@wesm
Copy link
Member Author

wesm commented Oct 1, 2012

Or start at 0?

@jseabold
Copy link
Contributor

jseabold commented Oct 1, 2012

Maybe more Pythonic to start at 0, but I don't think people really think of DataFrame columns positionally. No strong opinion either way.

@changhiskhan
Copy link
Contributor

I vote for starting at 0 since there's no compelling reason to break consistency here.
Otherwise it's a little weird that DataFrame(data) starts numbering the columns at 0 but pd.read_csv('frame.csv') gives columns that start at 1.

@wesm
Copy link
Member Author

wesm commented Oct 1, 2012

OK. I'll bite for 'X0', ... , 'XN'. Hopefully will not cause too much damage

@wesm wesm closed this as completed in c0c7402 Oct 1, 2012
wesm added a commit that referenced this issue Oct 1, 2012
yarikoptic added a commit to neurodebian/pandas that referenced this issue Nov 15, 2012
Version 0.9.0

* tag 'v0.9.0': (43 commits)
  RLS: Version 0.9.0 final
  Fix groupby.median documentation
  BUG: need extra slash on windows for file://
  BUG: default pandas.io.data start date 1/1/2000 per docs. close pandas-dev#2011
  clean up tests
  Allow DataFrame.update to accept non DataFrame object and attempt to coerce.
  ENH: Use given name for DataFrame column name for FRED API
  BLD: quiet tox warning about missing dep
  BUG: reset_index fails with MultiIndex in columns pandas-dev#2017
  BUG: with_statement in test_console_encode() (3a11f00) broke 2.5 test suite
  BUG: dict comprehension in (af3e13c) broke 2.6 test suite
  BUG: Timestamp dayofyear returns day of month pandas-dev#2021
  BUG: pandas breaks mpl plot_date
  DOC: update parsers header, names args doc
  BUG: read_csv regression, moved date parsing to before type conversions now so can parse yymmdd hhmm format now pandas-dev#1905
  Fix naming of ewmvar and ewmstd in documentation
  DOC: whats new for pandas-dev#2000
  ENH: change default header names in read_* functions from X.1, X.2, ... to X0, X1, ... close pandas-dev#2000
  TST: make test suite pass cleanly on python 3 with no matplotlib
  BUG: datetime64 formatting issues in DataFrame.to_csv. close pandas-dev#1993
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants