loop values directly to csv

Viewed 58

to make things simple, say I have the following:

for i in range(0 ,100):
   value1 = i*0.01  
   value2 = i*2.75 

how to can I write value1 and value2 into a csv file using pandas, so that the result looks as followed:

value1        value2 
0               0
0.01            2.75
0.02            5.25
.....            ...

I've been search but could find any example that using a simple value as input to a csv file. any idea how may I do this!

5 Answers
Related