List CSV to Dictionary

Hi,
I have a large CSV list that I stored on tinydb.
Using the “for each item in list” search, the search ends up being a little slow. (3,000 items)
However, researching other ways to optimize this, I came across the dictionary.

Using the list in the dictionary, I can receive the values instantly.
But with this method, when I enter the number “2” for example, I get the second item on the list, not the item that has ID 2.

What I was thinking, would be to insert the ID as a key in the dictionary and get the value using the block below.

Summary

image

Is my idea possible and functional or is it out of the question?