-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Improve documentation for mode parameter in to_csv() method #47058
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
Hi, I am new to Open source and I am looking forward to working on this issue, this would be my first open-source contribution. |
I think linking to Python's |
I guess you are right will do that. |
That crossed my mind, but I haven't seen such links in documentation elsewhere, so I wasn't sure if that would be a non-standard practice. Also, adding just a link would not solve the problem of someone coming to the page looking for the appropriate parameter to use to append content to a file. (Searching the page for the word "append" will still turn up nothing; this is what I did when I was looking for the parameter to use.) |
If you don't mind me asking? |
* Changes as requested in #47058 This is my first open-source contribution. Please let me know if there are any mistakes, will rectify them * required changes as per #47058 Please let me know if have to change anything. * changes to doc as per #47058 If any more changes required please let me know. * Changes to doc as per #47058 Let me know if there are any changes * Update pandas/core/generic.py * Update pandas/core/generic.py * Update pandas/core/generic.py Co-authored-by: Matthew Roeschke <[email protected]>
* Changes as requested in pandas-dev#47058 This is my first open-source contribution. Please let me know if there are any mistakes, will rectify them * required changes as per pandas-dev#47058 Please let me know if have to change anything. * changes to doc as per pandas-dev#47058 If any more changes required please let me know. * Changes to doc as per pandas-dev#47058 Let me know if there are any changes * Update pandas/core/generic.py * Update pandas/core/generic.py * Update pandas/core/generic.py Co-authored-by: Matthew Roeschke <[email protected]>
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.to_csv.html
Documentation problem
The description for the mode parameter is too sparse. Additional information on other acceptable values would be helpful, especially mode='a'.
Suggested fix for documentation
Proposed change:
mode : str, default 'w'
String character(s) to indicate the mode in which the file is opened for writing. Valid values include: 'w' for "write" access, 'w+' or 'r+' for read and write access, 'x' or 'x+' for exclusive creation access, and 'a' or 'a+' for append access. All strings have an implied 't' for text access; binary access is not permitted.
The text was updated successfully, but these errors were encountered: