[model] refactor #to_csv and .to_csv