Data arrange and csv save