ENH: a function to export to csv format
DOC: adding example to export_csv
TEST: adding tempfile to export_csv doctest