Now I would like to have the number of significant digits of tmax as a new column of my df. Since tmax are Floats ndigit does not work. Is there a way to easily do this?

Thanks to both of you for the reply. I think jd-fosters answer does not work, since Base.Math.modf still returns floats. Also there would be issues with 0 at the end and numbers like 1.1.

rafael.guerra I really like your answer. I am not sure about
(length(s)>1) && (df.sdigs[i] += length(rstrip(s[2],β0β)))

since that removes significant 0βs at the end, doesnβt it?

All right, thanks alot! So yeah those 0βs are significant and should be kept. Your code works great. Really helped me. Also very nice to already include a solution for scientific number notation!