I think a more idiomatic way of doing this in Julia would be to use filter:
filter(row -> row[:IndexVal] in [1,3,5], temp_df)
But in order to get in working as you want, you need to use . to vectorize it and use a little “trick”:
temp_df[in.(temp_df[:IndexVal], ([1,3,5],)), :]
The trick there is to have the second array as an (only) element of some other iterable (I used a 1-element tuple but it can also be an array of arrays - [[1,3,5]]).
You can read more about vectorizing/broadcasting from the Functions section of the manual.
Yet another way is to use findin to get the desired indices: