# Scanning a list of dictionaries

**URL:** <https://forum.kx.com/t/scanning-a-list-of-dictionaries/6680>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [July 27, 2010, 7:03pm UTC](https://forum.kx.com/t/scanning-a-list-of-dictionaries/6680 "2010-07-27T19:03:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Wong1](https://avatars.discourse-cdn.com/v4/letter/v/b77776/32.png) [@Victor\_Wong1](https://forum.kx.com/u/Victor_Wong1)\
**Post date:** [July 27, 2010, 7:03pm UTC](https://forum.kx.com/t/scanning-a-list-of-dictionaries/6680/1 "2010-07-27T19:03:00Z")

</div>

Hi,I have a list of dictionaries which I am trying to scan () over. qautomatically converts my list of dictionaries into a table, which isnice for certain tasks. However, when I want to scan over it, itreturns a `nyi error, while the function works fine if fed twodictionaries directly. Is there a way to scan a list of dictionarieswithout rolling one’s own, using do or while?Thanks,Victor

---

<div class="post-metadata">

**Author:** ![michael\_plumlee](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@michael\_plumlee](https://forum.kx.com/u/michael_plumlee)\
**Post date:** [July 27, 2010, 10:28pm UTC](https://forum.kx.com/t/scanning-a-list-of-dictionaries/6680/2 "2010-07-27T22:28:00Z")

</div>

Could you give an example?q) (,) (0 1!`a`b;2 3!`c`d)0 1!`a`b0 1 2 3!`a`b`c`dOn Jul 27, 1:03?pm, Victor Wong \<victor.w…\> wrote:\> Hi,\>\> I have a list of dictionaries which I am trying to scan () over. ?q\> automatically converts my list of dictionaries into a table, which is\> nice for certain tasks. ?However, when I want to scan over it, it\> returns a `nyi error, while the function works fine if fed two\> dictionaries directly. ?Is there a way to scan a list of dictionaries\> without rolling one’s own, using do or while?\>\> Thanks,\> Victor\</victor.w…\>

---

<div class="post-metadata">

**Author:** ![heydi1](https://avatars.discourse-cdn.com/v4/letter/h/f17d59/32.png) [@heydi1](https://forum.kx.com/u/heydi1)\
**Post date:** [July 27, 2010, 10:36pm UTC](https://forum.kx.com/t/scanning-a-list-of-dictionaries/6680/3 "2010-07-27T22:36:00Z")

</div>

i think Victor’s case are using non integer as dict:

q)(,) ?(`a`b!0 1;`a`b!3 4;`a`b!4 5)

`nyi

q)(,) ?flip (`a`b!0 1;`a`b!3 4;`a`b!4 5)

a| 0 3 4

b| 0 3 4 1 4 5

Xi

---

<div class="post-metadata">

**Author:** ![Victor\_Wong1](https://avatars.discourse-cdn.com/v4/letter/v/b77776/32.png) [@Victor\_Wong1](https://forum.kx.com/u/Victor_Wong1)\
**Post date:** [July 28, 2010, 12:08am UTC](https://forum.kx.com/t/scanning-a-list-of-dictionaries/6680/4 "2010-07-28T00:08:00Z")

</div>

Yes, I am using a symbol key for the dictionary. I did not know thatwas a difference between integer and non-integer keys for scan.VictorOn Jul 27, 2:36?pm, Xi Chen \<heydic…\> wrote:\> i think Victor’s case are using non integer as dict:\>\> q)(,) ?(`a`b!0 1;`a`b!3 4;`a`b!4 5)\> `nyi&gt;&gt; q)(,\) ?flip (`a`b!0 1;`a`b!3 4;`a`b!4 5)&gt; a| 0 3 4&gt; b| 0 3 4 1 4 5&gt;&gt; Xi&gt;&gt; On 27 July 2010 22:28, michael.plumlee <michael.plum...> wrote:&gt;&gt;&gt;&gt; &gt; Could you give an example?&gt;&gt; &gt; q) (,\) ?(0 1!`a`b;2 3!`c`d)&gt; &gt; 0 1!`a`b&gt; &gt; 0 1 2 3!`a`b`c`d&gt;&gt; &gt; On Jul 27, 1:03 pm, Victor Wong <victor.w...> wrote:&gt; &gt; &gt; Hi,&gt;&gt; &gt; &gt; I have a list of dictionaries which I am trying to scan (\) over. ?q&gt; &gt; &gt; automatically converts my list of dictionaries into a table, which is&gt; &gt; &gt; nice for certain tasks. ?However, when I want to scan over it, it&gt; &gt; &gt; returns a `nyi error, while the function works fine if fed two\> \> \> dictionaries directly. ?Is there a way to scan a list of dictionaries\> \> \> without rolling one’s own, using do or while?\>\> \> \> Thanks,\> \> \> Victor\>\> \> –\> \>

Submitted via Google Groups\</victor.w…\>\</michael.plum…\>\</heydic…\>
