Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CSV files
#1
Hello everybody,

I have a problem. I have a CSV file and I use this file in my program. From my output I make a new csv file but I would like to use this output again as input for 100 times. For example i want to see the 50th simulation. So the same csv file has to update.
I thought to make a for loop f.e: my input is L and the output is C. But I don’t know how to integrate this in the loop. Someone some tips/help?

Thank you all.
Reply
#2
Are you saying you want to see all the results for each generation in the csv file? I would read the file in before the loop. Then at the end of each loop, write the output file in 'a' mode (appends to the file) without headers (so they don't repeat).
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
No, I have an csv as input and a new one as output but now I want tobuse the output as input and then agian and agian and I want to know the 50th output for example.
Reply
#4
Quote:No, I have an csv as input and a new one as output but now I want tobuse the output as input and then agian and agian and I want to know the 50th output for example.
This is difficult to understand. Please show step by step pseudo code.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020