Creating a CSV correctly has nothing at all to do with choosing a framework. In Python there's a CSV module in the stdlib that you can use -- but talking about that in a discussion of frameworks tells you nothing about the frameworks, and would simply be a distraction.
It’s only a distraction if you can safely assume that code that runs on the server will never need a client-side component to match. Sure you can pull in random Python packages… but you can’t run them in the browser.