-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
SAS validate null dates #39726
Conversation
wertha
commented
Feb 10, 2021
•
edited
Loading
edited
- closes BUG: SAS datetime column with null values cannot be parsed. #39725
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
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.
pls add a whatsnew note in bug fixes 1.3 in the I/O section.
cc @bashtage |
26ff9b3
to
4c0181e
Compare
It looks good aside from my personal preference over multi-line lambda functions which are really hard to read. |
51b54ae
to
8c4309c
Compare
pandas/io/sas/sas7bdat.py
Outdated
s_series = sas_datetimes.apply( | ||
lambda sas_float: datetime(1960, 1, 1) + timedelta(seconds=sas_float) | ||
) | ||
if unit in ["s", "d"]: |
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.
wondering if its better to move the arg check, and raise
into the _parse_datetime()
function?
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.
yes, makes sense, that way we don't double check. Will do
8c4309c
to
6aa6f64
Compare