There is no federal law, but there is policy.
Seattle Times, June 26, 2010
"Steven Jost, a spokesman for the Census Bureau, said it is unlikely that the policy prohibiting census workers from carrying weapons will be rescinded."