I have data coming in and some of it is prefixed with a z. I want toget rid of this z and it needs to stay in the current dictionaryformat.data:()!()data[singers]:((
zabba; 1 2 3);(elvis; 2 3 4);(
zbeatles; 4 9 8))true_names:(zabba
abbazelvis
elviszbeatles
beatles)!(abba
abbaelvis
elvisbeatles
beatles)I am currently usingdata[singers][;0]:' true_names[data[
singers][;0]]Which returnsabba
elvis`beatleBut doesn’t reassign the values. Does anyone have any insight forthis?Thanks,Nick
Just got this sorted, soloution is below for referencedata[singers;;0]:true_names data[
singers;;0]>From splitting the index I wasn’t overwriting the global value indata.Thanks,NickOn Feb 4, 10:43?am, Nick <nickmcd…> wrote:> I have data coming in and some of it is prefixed with a z. I want to> get rid of this z and it needs to stay in the current dictionary> format.>> data:()!()> data[singers]:((
zabba; 1 2 3);(elvis; 2 3 4);(
zbeatles; 4 9 8))> true_names:(zabba
abbazelvis
elviszbeatles
beatles)!> (abba
abbaelvis
elvisbeatles
beatles)>> I am currently using>> data[singers][;0]:' true_names[data[
singers][;0]]>> Which returns>> abba
elvis`beatle>> But doesn’t reassign the values. Does anyone have any insight for> this?>> Thanks,>> Nick</nickmcd…>
To: personal-kdbplus@googlegroups.com
X-Mailer: Apple Mail (2.1082)
.[data;(
singers;::;0);true_names]
Regards,
Attila
On 4 Feb 2011, at 11:44, Nick wrote:
> Just got this sorted, soloution is below for reference
>
> data[singers;;0]:true_names data[
singers;;0]
>
> =46rom splitting the index I wasn’t overwriting the global value in
> data.
>
>
> Thanks,
>
> Nick
>
> On Feb 4, 10:43 am, Nick <nickmcd…> wrote:
>> I have data coming in and some of it is prefixed with a z. I want to
>> get rid of this z and it needs to stay in the current dictionary
>> format.
>>
>> data:()!()
>> data[singers]:((
zabba; 1 2 3);(elvis; 2 3 4);(
zbeatles; 4 9 8))
>> true_names:(zabba
abbazelvis
elviszbeatles
beatles)!
>> (abba
abbaelvis
elvisbeatles
beatles)
>>
>> I am currently using
>>
>> data[singers][;0]:' true_names[data[
singers][;0]]
>>
>> Which returns
>>
>> abba
elvis`beatle
>>
>> But doesn’t reassign the values. Does anyone have any insight for
>> this?
>>
>> Thanks,
>>
>> Nick
>
> –
> You received this message because you are subscribed to the Google =
Groups “Kdb+ Personal Developers” group.
> To post to this group, send email to =
personal-kdbplus@googlegroups.com.
> To unsubscribe from this group, send email to =
personal-kdbplus+unsubscribe@googlegroups.com.
> For more options, visit this group at =
http://groups.google.com/group/personal-kdbplus?hl=en.
>
</nickmcd…>