I have run a script in VS Code and it works. However, I forgot to export the dataframe as a CSV. I do not want to run the script again as it connects to a paid API and I will be paying for more requests.
Is it possible to type a line of code directly into the terminal to export the dataframe as a CSV? I have tried typing below into the terminal to export it from there but it does not work:
data_frame.to_csv("full name dataframe.csv",index=False)
CodePudding user response:
I'm sorry to tell you that this should not be possible. After the python script runs, the cache is usually cleaned up after the session ends. So you can't get the data and save it without running the script again.