• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Saving data in csv file in Python

Resolved: Saving data in csv file in Python

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I want to save the data in a csv file in a specific format but I am getting an error. The desired output is attached.
The error is
The desired output is
enter image description here

Answer:

In zip function, parameter needs __iter__ function to execute.
So TypeError: ‘int’ object is not iterable error occured because int object doesn’t have this function.
Make x variable to list type then it works.

If you have better answer, please add a comment about this, thank you!

csv numpy python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: std::regex_replace to replace multiple combinations

26/03/2023

Resolved: How can I copy files using the ansible.builtin.copy module and avoid conflicting file names?

26/03/2023

Resolved: Reshape tensors of unknown shape with tf.function

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.