Skip to content

Commit

Permalink
Supplies tentative implementation for cumsum
Browse files Browse the repository at this point in the history
  • Loading branch information
jesus.lopez7.contractor committed Nov 8, 2023
1 parent 7de2b7c commit 0fa1d5c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pykx/pandas_api/pandas_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,17 @@ def any(self, axis=0, bool_only=False, skipna=True):
res, cols = preparse_computations(self, axis, skipna, bool_only=bool_only)
return (q('{"b"$x}', [any(x) for x in res]), cols)

@convert_result
def cumsum(self, axis=0, skipna=True):
res, cols = preparse_computations(self, axis, skipna)
return (q(
'{[row]'
'{$[11h=type x;'
'{[x1; y1] `$string[x1], string y1} scan x;'
'sums x]} each row}',
res
), cols)

@convert_result
def max(self, axis=0, skipna=True, numeric_only=False):
res, cols = preparse_computations(self, axis, skipna, numeric_only)
Expand Down

0 comments on commit 0fa1d5c

Please sign in to comment.