Skip to content

DOC: add documentation for read_spss(#27476) #27594

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

Merged
merged 2 commits into from
Jul 26, 2019

Conversation

another-green
Copy link
Contributor

@another-green another-green commented Jul 25, 2019

Documentation is added for the new read_spss function.
After the generating html in Sphinx, it looks like this:

IO page top:
IO page
SPSS description:
SPSS description
API section:
SPSS API

@WillAyd WillAyd added the Docs label Jul 26, 2019
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @cbrnr for additional input

SPSS files contain column names. By default the
whole file is read and returned as a ``DataFrame`` with all columns.

Specify a ``usecols`` to obtain a subset of columns. Specify ``apply_value_formats=True``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this called convert_categoricals? Also I think worth mentioning this is the default so user would have to disable if they didn't want it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the good catch! Totally agree.


.. code-block:: python

df = pd.read_sas('spss_data.zsav', usecols=usecols, apply_value_formats=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read_spss here right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep~

@another-green another-green force-pushed the spss_doc branch 3 times, most recently from d863fa0 to 6b586d0 Compare July 26, 2019 03:18
@WillAyd WillAyd added this to the 1.0 milestone Jul 26, 2019
@WillAyd WillAyd merged commit 47a6635 into pandas-dev:master Jul 26, 2019
@WillAyd
Copy link
Member

WillAyd commented Jul 26, 2019

Thanks @yanglinlee - this is a great update (and glad you learned something new)

@another-green another-green deleted the spss_doc branch July 29, 2019 13:19
quintusdias pushed a commit to quintusdias/pandas_dev that referenced this pull request Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Missing documentation for read_spss()
3 participants