Skip to content

Commit

Permalink
Removed blank spaces. Improved tests. Merged solved
Browse files Browse the repository at this point in the history
  • Loading branch information
cperezln committed Jan 18, 2024
1 parent 46010a9 commit 267111f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
20 changes: 0 additions & 20 deletions docs/user-guide/advanced/Pandas_API.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -367,34 +367,14 @@
"\n",
"| Type | Description |\n",
"| :---------------: | :------------------------------------------------------------------- |\n",
<<<<<<< HEAD
"| List | The values of the table as a matrix. |"
=======
"| List | Rows of the table, each as a list. |"
>>>>>>> 7b151668a9f6959214da50aa225ccf3e2bac8325
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a7843813-43fc-4920-acd9-6fd2dd50c32e",
"metadata": {},
<<<<<<< HEAD
=======
"outputs": [
{
"ename": "NameError",
"evalue": "name 'tab' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/tmp/ipykernel_77428/394326152.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtab\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'tab' is not defined"
]
}
],
>>>>>>> 7b151668a9f6959214da50aa225ccf3e2bac8325
"source": [
"tab.values"
]
Expand Down
4 changes: 0 additions & 4 deletions src/pykx/pandas_api/pandas_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ def sum(self, axis=0, skipna=True, numeric_only=False, min_count=0):
min_count
), cols)

<<<<<<< HEAD
=======

>>>>>>> 7b151668a9f6959214da50aa225ccf3e2bac8325
def agg(self, func, axis=0, *args, **kwargs): # noqa: C901
if 'KeyedTable' in str(type(self)):
raise NotImplementedError("'agg' method not presently supported for KeyedTable")
Expand Down
13 changes: 0 additions & 13 deletions tests/test_pandas_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2038,16 +2038,3 @@ def test_keyed_loc_fixes(q):
mkt[['k1', 'y']]
with pytest.raises(KeyError):
mkt['k1']
<<<<<<< HEAD
=======

def test_values(q):
col1 = q('10?100')
col2 = q('10?`a`b`c`d')
col3 = q('10?`x`y`z`1`2`3')
tab = q('{[price; sym; id] ([]p: price; s: sym; i: id)}', col1, col2, col3)
q_table = tab
pandas_table = tab.pd()
lol = np.array(q_table.values())
assert pandas_table.values == np.array(q_table.values().py())
>>>>>>> 7b151668a9f6959214da50aa225ccf3e2bac8325

0 comments on commit 267111f

Please sign in to comment.