Add to_csv method