Writes out tidy data as csv