`foo.csv` will not be known here (it was generated and removed in io.rst itself). So make it a `code-block` (so the code won't be executed), or you have to add the creation of foo.csv