Python Forum

Full Version: Saving Values Changed in a database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everybody, I'm fairly new to Python (and coding in general) and I have a question:

Is there a way that I can save any changes I made to a csv during my coding?

Basically, I'm writing a program where I want to change values on a CSV file based upon random numbers I have generated. I have gotten that part down to work exactly like I want it, however, I want to save those values I get from those random numbers into that CSV and edit those numbers permanently. Is there a way to do that?

Right now, I get those values and edit the dataframe, but when I exit my work and go back those values generated by the random number will change and I do not want them to do that.

Any help is greatly appreciated! Thanks!
I'm not sure I know what you are trying to do here.
If all you want to do is save a list of random numbers, append them to the end of the file, with some sort of Id so they can be identified later.