-
Introduction to PyKX section 3 Exercise 10
Hi all,
for the exercise 10:
Return all close prices and volume from tab_BTC for the last date
I wonder that the suggested solution may be incorrect.
<pre class=”hljs language-q”>tab_BTC.get([‘volume’, ‘close’, ‘date’], tab_BTC[‘date’] == kx.q.max(tab_BTC[‘date’]))
it returns all rows without filtering the date with last date.
see attached.
seems that this should work like this (returns 180 row):
<pre class=”hljs language-q”>tab_BTC[tab_BTC[‘date’] == kx.q.max(tab_BTC[‘date’])].get([‘volume’, ‘close’])
Sorry, there were no replies found.
Log in to reply.