-
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
Values first approach #20
Conversation
src/pykx/pandas_api/pandas_meta.py
Outdated
@api_return | ||
def values(self, skipna = True, numeric_only = False): | ||
tab = self | ||
return q('{[table] flip value flip table}', tab) |
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.
Maybe something like this is more efficient:
return q("value peach", tab)
tests/test_pandas_api.py
Outdated
col3 = q('10?`x`y`z`1`2`3') | ||
matrix = q('{[r1; r2; r3] flip enlist[r1; r2; r3]}', col1, col2, col3) | ||
tab = q('{[price; sym; id] ([]p: price; s: sym; i: id)}', col1, col2, col3) | ||
assert tab.values().py() == matrix.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.
I would do the test the way I told you before:
q_table = tab
pandas_table = tab.pd()
q("~", kx.toq(pandas_table.values), q_table.values())
@@ -1287,7 +1326,9 @@ | |||
{ | |||
"cell_type": "markdown", | |||
"id": "35062560", | |||
"metadata": {}, | |||
"metadata": { |
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.
Can you redo this change, pls
"metadata": { | ||
"scrolled": false | ||
}, | ||
"metadata": {}, |
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.
Can you redo this change?
@@ -257,6 +262,7 @@ def sum(self, axis=0, skipna=True, numeric_only=False, min_count=0): | |||
min_count | |||
), cols) | |||
|
|||
|
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.
can you redo this change?
Please go the the
Preview
tab and select the appropriate sub-template: