Here are my comments on your code (I concentrate on major things):
Array(unique!(df.img_name))
is a serious bug - it resizes :img_name column in place and corrupts df. You will get errors when trying to work with df after this operation. Just write:
unique(df.img_name)
instead.
If you fix this all works correctly except that you need to display your plot:
p = plot()
for sdf in groupby(df, :img_name)
histogram!(sdf.f_circ)
end
display(p)