Skip to content

SAS validate null dates #39726

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 5 commits into from
Feb 12, 2021
Merged

SAS validate null dates #39726

merged 5 commits into from
Feb 12, 2021

Conversation

wertha
Copy link
Contributor

@wertha wertha commented Feb 10, 2021

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.

pls add a whatsnew note in bug fixes 1.3 in the I/O section.

@jreback jreback added the IO SAS SAS: read_sas label Feb 11, 2021
@jreback jreback added this to the 1.3 milestone Feb 11, 2021
@jreback
Copy link
Contributor

jreback commented Feb 11, 2021

cc @bashtage

@wertha wertha requested a review from jreback February 11, 2021 01:03
@wertha wertha force-pushed the sas_null_dates branch 3 times, most recently from 26ff9b3 to 4c0181e Compare February 11, 2021 08:37
@bashtage
Copy link
Contributor

It looks good aside from my personal preference over multi-line lambda functions which are really hard to read.

@wertha wertha force-pushed the sas_null_dates branch 2 times, most recently from 51b54ae to 8c4309c Compare February 12, 2021 00:33
s_series = sas_datetimes.apply(
lambda sas_float: datetime(1960, 1, 1) + timedelta(seconds=sas_float)
)
if unit in ["s", "d"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

wondering if its better to move the arg check, and raise into the _parse_datetime() function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, makes sense, that way we don't double check. Will do

@jreback jreback merged commit 934fc81 into pandas-dev:master Feb 12, 2021
@wertha wertha deleted the sas_null_dates branch February 12, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SAS SAS: read_sas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: SAS datetime column with null values cannot be parsed.
4 participants