Skip to content
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

Closed

Conversation

cperezln
Copy link

Please go the the Preview tab and select the appropriate sub-template:

@cperezln cperezln added the work in progress Working on it label Dec 21, 2023
@cperezln cperezln closed this Dec 21, 2023
@cperezln cperezln reopened this Dec 21, 2023
@cperezln cperezln marked this pull request as draft December 21, 2023 12:45
@cperezln cperezln self-assigned this Dec 21, 2023
@marcosvm13 marcosvm13 added this to the Pandas API 2nd Block milestone Dec 21, 2023
@marcosvm13 marcosvm13 linked an issue Dec 21, 2023 that may be closed by this pull request
@api_return
def values(self, skipna = True, numeric_only = False):
tab = self
return q('{[table] flip value flip table}', tab)

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)

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()

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())

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 21, 2023
@@ -1287,7 +1326,9 @@
{
"cell_type": "markdown",
"id": "35062560",
"metadata": {},
"metadata": {

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": {},

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)


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?

@cperezln cperezln closed this Jan 11, 2024
neutropolis pushed a commit that referenced this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python tests work in progress Working on it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants