Skip to content
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

BUG: Ensure read_spss accepts pathlib Paths (GH33666) #36174

Merged
merged 2 commits into from
Sep 13, 2020

Conversation

drmrd
Copy link
Contributor

@drmrd drmrd commented Sep 6, 2020

Wrapped the path passed into pandas.io.spss.read_spss in a pandas.io.common.stringify_path call prior to passing it to pyreadstat.read_sav. This fixes #33666. I've also included tests validating pd.read_spss accepts strings and pathlib.Paths.

@jreback jreback added the IO Stata read_stata, to_stata label Sep 7, 2020
@jreback jreback added this to the 1.1.2 milestone Sep 7, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

if you can respond (and merge master) soon as tagging 1.12 tomorrow (otherwise pls move the note to 1.2) when you can.

pandas/tests/io/test_spss.py Outdated Show resolved Hide resolved
pandas/tests/io/test_spss.py Outdated Show resolved Hide resolved
@jreback
Copy link
Contributor

jreback commented Sep 7, 2020

cc @simonjayhawkins possible if can be done before the tag (otherwise nbd)

@jreback jreback modified the milestones: 1.1.2, 1.1.3 Sep 8, 2020
doc/source/whatsnew/v1.1.2.rst Outdated Show resolved Hide resolved
@drmrd drmrd force-pushed the read-spss-pathlib-path-support branch from de043c2 to 9ff4eaf Compare September 10, 2020 04:14
@drmrd drmrd requested a review from jreback September 10, 2020 04:16
@drmrd
Copy link
Contributor Author

drmrd commented Sep 13, 2020

@jreback I addressed the changes you requested earlier this week, and I believe the PR is ready for another round of review.

@jreback jreback merged commit 69ff179 into pandas-dev:master Sep 13, 2020
@jreback
Copy link
Contributor

jreback commented Sep 13, 2020

thanks @drmrd very nice

@simonjayhawkins
Copy link
Member

@meeseeksdev backport 1.1.x

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Sep 13, 2020
simonjayhawkins pushed a commit that referenced this pull request Sep 13, 2020
…666) (#36347)

Co-authored-by: Dan Moore <9156191+drmrd@users.noreply.github.com>
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Stata read_stata, to_stata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read_spss only accepts str, not Path
3 participants