regarding saving generated arrays into into independent column
I am writing a program, in a loop process the code generates two arrays, predict_result and ground_truth, I want to save each array into a new column for separate csv files. This is the main code snippet. However, each array is appended into the original array. In other words, I get two large single column files. 

```python
    ```
 with open(file_1, 'w+') as predict_csv, open(file_2 , 'w+') as truth_csv:

     for ij in range(0,100):
         #  some other code here
         # predict_result is an array of shape, e.g., [100,1]
        # ground_truth  is also an array of shape, e.g.,[100,1]
         predict_result_pd = pd.DataFrame(predict_result)
         ground_truth_pd = pd.DataFrame(ground_truth)
         predict_result_pd.to_csv(predict_csv,header=False,mode='a')
         ground_truth_pd.to_csv(truth_csv,header=False,mode='a')
  
```