-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Update df.to_stata() docstring #19818
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
Conversation
pandas/core/frame.py
Outdated
@@ -1635,13 +1635,11 @@ def to_stata(self, fname, convert_dates=None, write_index=True, | |||
|
|||
Examples | |||
-------- | |||
>>> writer = StataWriter('./data_file.dta', data) | |||
>>> writer.write_file() |
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 wouldn't necessarily change these. Perhaps just add another example that doesn't use StataWriter
.
Codecov Report
@@ Coverage Diff @@
## master #19818 +/- ##
==========================================
- Coverage 91.61% 91.58% -0.03%
==========================================
Files 150 150
Lines 48892 48892
==========================================
- Hits 44792 44778 -14
- Misses 4100 4114 +14
Continue to review full report at Codecov.
|
Is that better? I also think some people might not realize that |
>>> writer = StataWriter('./data_file.dta', data) | ||
>>> writer.write_file() | ||
|
||
Or with dates | ||
With dates: |
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.
Not sure you need this line anymore in fact.
thanks! |
Updates the docstring for the
to_stata()
method to fix thedataset_label
parameter. See #19817. Also changes the examples; it's a little weird for the examples forto_stata()
to detail theStataWriter
class.git diff upstream/master -u -- "*.py" | flake8 --diff