workaround pd.to_csv bug?