kdb+ and q
Q+A on all things kdb+ database and the q language
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Conditional Upsert

Hi Guys, Whats the best way to conditionally upsert two tables? For example if I have two tablest:`sym xkey flip (`sym`val)!(`a`b`c;(1;3;5))t1:`sym xkey flip (`sym`val)!(`b`c`d;(8;1;9))and I want to only update values in table t when there is a highe...

Creating plots with R

I'm trying to chart my data using R directly from q. The plot is opening up but the window is not responsive, can't be resized and it's marked as (Not Responding) by windows. I can close it by running dev.off() but it won't open up straight away the ...

How can I get rankings like pandas?

Hi,I want to rank a list of numbers: 1 2 3 4 5 3 3 3In kdb+/q, by using rank function, the result is 0 1 2 6 7 3 4 5. The duplicates do not get the same ranking results.Ideally, I want to have: 0 1 3.5 6 7 3.5 3.5 3.5Any help would be greatly appreci...

kc3031 by New Contributor
  • 5 replies
  • 0 kudos

How could q read Unicode csv file correctly?

Hello all. I use the code below to read a csv file which contains Chinese characters, but the output is not shown correctly.CstInfo"sdsssbs"; 1# ",")0:`CustomerInfo1.csvThe content of csv file is:CstID,CstACDate,CstName,CstProp,CstCatag,IsFinanceInv,...

Merge two tables

Hello all, I may be having a brain freeze right now, but wondering if someone can help. I have two tables and I want to merge them by sym.First table (flip (enlist `sym)!(enlist `A`B`C))symABCSecond table (flip (enlist `minute)!(enlist {[st;en;i] st+...