Note that there is no requirement to use transform for everything in DataFrames, and at times I find it actively reducing code clarity. In my opinion (and this is nothing more!) this is one of those situations. I would write:
I would like to add a different solution (which, incidentally, also takes into account situations where the dictionary is not complete)
df = DataFrame(
a = 1:4,
b = ["beetle", "fly", "spider","unicorno"])
arthropod_dict = Dict(
"beetle" => "insect",
"fly" => "insect",
"spider" => "arachnid")
dict=DataFrame(from=collect(keys(arthropod_dict)),to=collect(values(arthropod_dict)))
in this case a sort of function transpose(dataframe) would have been convenient
outerjoin(df,dict,on=:b=>:from)