Creation from Excel Serial Dates
Pull Request Checklist
Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:
- [x] 🧪 Added tests for changed code.
- [x] 🛠️ All tests pass when run locally (run
toxormake testto find out!). - [x] 🧹 All linting checks pass when run locally (run
tox -e lintormake lintto find out!). - [x] 📚 Updated documentation for changed code.
- [x] ⏩ Code is up-to-date with the
masterbranch.
If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!
Description of Changes
Closes: #977. New support for creation of Arrow objects from Excel Serial Dates. There seems to be an issue with the linting of the docs, after some tests have been run. Not too sure what it is at first glance.
Codecov Report
Merging #979 (9e0cb4f) into master (119bb67) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## master #979 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 2054 2064 +10
Branches 330 332 +2
=========================================
+ Hits 2054 2064 +10
| Impacted Files | Coverage Δ | |
|---|---|---|
| arrow/arrow.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 119bb67...9e0cb4f. Read the comment docs.
Would this PR be incorporating the decimal portion of the excel serial?
Yes it would. I can add test cases to make it more clear.
Rather than creating a new function, I think it may be more consistent with our existing get() interface to add this as a keyword argument like arrow.get(..., excel: bool, default_windows_date: bool). If the excel kwarg is present, we parse the timestamp as an excel timestamp (and account for the default_windows_date kwarg as well), else just parse the input time string as normal.
@jadchaar do you think that arrow.get() might have too many kwargs if we add this?