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

Forum Posts

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
  • 1664 Views
  • 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+...

splitting the difference

it's probably obvious to the more astute, but i didn't know what would happen at the end of a bargaining process starting at a bid of 1, ask of 2, bid of 1.5... splitting the difference each time {last[x],avg x}\[1 2]

effbiae by New Contributor
  • 585 Views
  • 1 replies
  • 0 kudos

Bloomberg.c question

Hi, K u = knk(3, ks(ss((S)blpapi_Message_typeString(m))), ki(c.value.intValue), sequence_to_dictionary(e)); K ret = k(0, "Update", u, (K)0);My understanding, the above code has bloomberg event data into k structure u and call update of q function.The...

Eric by New Contributor
  • 367 Views
  • 0 replies
  • 0 kudos