A note on p-ranks of class groups in Z_p-extensions