Skip to content

Conversation

kylebarron
Copy link
Contributor

Updates the docstring for the to_stata() method to fix the dataset_label parameter. See #19817. Also changes the examples; it's a little weird for the examples for to_stata() to detail the StataWriter class.

@gfyoung gfyoung added Bug Docs IO Stata read_stata, to_stata labels Feb 21, 2018
Examples
--------
>>> writer = StataWriter('./data_file.dta', data)
>>> writer.write_file()
Copy link
Member

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
Copy link

codecov bot commented Feb 21, 2018

Codecov Report

Merging #19818 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.96% <ø> (-0.03%) ⬇️
#single 41.79% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 97.23% <ø> (ø) ⬆️
pandas/plotting/_converter.py 65.22% <0%> (-1.74%) ⬇️
pandas/util/testing.py 83.64% <0%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa59954...59acd1e. Read the comment docs.

@kylebarron
Copy link
Contributor Author

Is that better? I also think some people might not realize that ./data_file.dta is the same as data_file.dta.

>>> writer.write_file()
Or with dates
With dates:
Copy link
Member

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.

@jreback jreback added this to the 0.23.0 milestone Feb 22, 2018
@jreback jreback merged commit ca05d7c into pandas-dev:master Feb 22, 2018
@jreback
Copy link
Contributor

jreback commented Feb 22, 2018

thanks!

harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Docs IO Stata read_stata, to_stata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong parameter name in to_stata() method
3 participants