-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added implementation of nunique function #29
Added implementation of nunique function #29
Conversation
… between Python and kdb+
… between Python and kdb+
… into chraberturas/pandas-api-nunique
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.
Overall OK, but there are some adjustments that I think would need to be made before merging.
Also, some interesting flags have been raised in regards to mixed value columns that will need addressing at some point.
… feature/pandas-api-nunique # Conflicts: # src/pykx/pandas_api/pandas_meta.py
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.
Looks good. Your solution to type checking on columns looks more robust than what I proposed originally.
Just spoke with the PyKX team. They told me that for this specific case, they would expect the behavior to be closer to what in q would be I think that as it stands right now the implementation follows these lines pretty closely. However, I think that in case we had a mixed type column we should no longer raise a TLDR: If we have several nulls of different types on a single column, they should all count as distinct values. |
* Added implementation of nunique function * Added test for handling strings nulls (" "), differentiating behavior between Python and kdb+ * Suggested changes. Error with mixed lists and tests for this case. * QError for mixed lists (suggested by Kx) * minor: rename filternan (suggested) --------- Co-authored-by: chraberturas <[email protected]>
Feature
What does this change introduce?
An implementation of the
nunique
function: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.nunique.htmlThis is intended to be a 1:1 implementation of the
nunique
function from pandas.There are two changes:
General
src/pykx/pykx.q
andsrc/pykx/reimporter.py
src/pykx/util.py
logic which is used for environment variable.zip
been updatedCode
Testing
Documentation
.md
file associated with it been created?mkdocs.yml