-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: header='infer' is not working when there is no header, closes #17473 #18042
Conversation
cmazzullo
commented
Oct 31, 2017
- closes header='infer' is not working when there is no header #17483
passed the behavior is identical to ``header=0`` and column names | ||
are inferred from the first line of the file, if column names are | ||
passed explicitly then the behavior is identical to | ||
``header=None``. Explicitly pass ``header=0`` to be able to replace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put a paragraph break here, its pretty long.
are passed the behavior is identical to ``header=0`` and column | ||
names are inferred from the first line of the file, if column | ||
names are passed explicitly then the behavior is identical to | ||
``header=None``. Explicitly pass ``header=0`` to be able to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add a note in Handling Column Names, maybe a ::note
box would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this note the same as above?
Codecov Report
@@ Coverage Diff @@
## master #18042 +/- ##
==========================================
- Coverage 91.45% 91.33% -0.12%
==========================================
Files 157 164 +7
Lines 51378 49802 -1576
==========================================
- Hits 46987 45487 -1500
+ Misses 4391 4315 -76
Continue to review full report at Codecov.
|
@jorisvandenbossche if you'd review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Added two small comments
doc/source/io.rst
Outdated
Default behavior is to infer the column names: if no names are | ||
passed the behavior is identical to ``header=0`` and column names | ||
are inferred from the first line of the file, if column names are | ||
passed explicitly then the behavior is identical to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add: passed explicitly with the header
keyword
doc/source/io.rst
Outdated
``header=None``. | ||
|
||
Explicitly pass ``header=0`` to be able to replace existing | ||
names. The header can be a list of ints that specify row locations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make the paragraph break here at "The header can be ..." and leave the first sentence at the previou paragraph.
can you rebase |
Sure thing @jreback |
@cmazzullo Seems something went wrong with the rebase (many commits included on github now). In principle if you do exactly the following (assuming pandas-dev/pandas remote is called upstream):
this should solve it. |
…he 'header' parameter
298051a
to
b8894ea
Compare
@cmazzullo quickly did the rebase myself. Thanks for this clarification of the docs! |
Thanks! |
…ndas-dev#17473 (pandas-dev#18042) (cherry picked from commit 67c4d0f)