Here I have a list value with date and x . Here I want to save this list value in new csv file with two columns date and x.

I tried many methods and it gave me new error.

```
x_new_value = [{'date':current_time, 'x':current_x }]

some code is running for get the new x value
after that:
x_new_value.append({'date':next_record_time, 'x':new_x})
for i in x_new_value:
print(i['date'], "\t\t", i['x'])

the output :

```

```html
2018-06-08 15:00:00    0.02
2018-06-08 16:00:00    0.0195
2018-06-08 17:00:00    0.018
2018-06-08 18:00:00    0.016
2018-06-08 19:00:00    0.013
```

Then I want to write this data in csv file :
I tried this code:

```
x_new_value.to_csv('Call.csv', date_format='%Y-%m-%d %H:%M:%S')

```

```html
AttributeError                            Traceback (most recent call last)
<ipython-input-22-e81fa450a0b0> in <module>()
      1 import csv
----> 2 x_new_value.to_csv('Call.csv', date_format='%Y-%m-%d %H:%M:%S')

AttributeError: 'list' object has no attribute 'to_csv'
```

Can anyone help me to solve this error?