Weighted Hardy inequalities and Hardy transforms of weights