Grounding Data Science Code Generation with Input-Output Specifications