Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tox
Added implementations for ADDRESS, COUNTA, COUNTBLANK, COLUMNS, ROWS, FILTER, and a few financial functions (IRR, PMT, PPMT). The financial functions are computed using the
numpy-financial
package and I didn't investigate how the IRR implementation in Excel might differ from it (Excel has a guess parameter, but numpy-financial doesn't use a guess). Perhaps there's a reason that pycel isn't already using this package - let me know if that's the case.I think the implementations for COLUMNS and ROWS could be improved perhaps using the
excel_helper
decorator, but I wasn't sure how to properly apply that I think.FILTER is also a bit of a strange case since it's only for Microsoft 365. I added a test xlsx file for this one.
Happy to change any of the implementations or tests.
Edit: Do you know why flake8 is failing on
src/pycel/lib/lookup.py
andtests/lib/test_financial.py
? I looks like that error message is a bug and it might happen when there are linter errors in the file, but when I run flake8 locally, I don't see anything...Edit part 2: Fixed the linter warnings being hidden by the flake8 bug.