py-util function to remove all zeros in the profile.dat