write the stacked df to stacked.csv