-1

I am working on data science using python and visual studio code but every time i run the code even the single line file starts from the begging which again upload the data and give the result which is not the same case with jupyter. Is there any solution to this, would be really appreciated. Thanks in advance

  • 1
    You could create a pickle object (pkl file) and check if you have already uploaded the data. [Here is an example](https://stackoverflow.com/questions/11218477/how-can-i-use-pickle-to-save-a-dict). – Jack Moody Feb 28 '19 at 08:06

1 Answers1

0

So you'd like Visual Studio Code to run your file in the same way that Jupyter does? In other words, you'd like to run your code one "cell" at a time, like Jupyter does. Visual Studio Code can do this with the Python extension:

Python in Visual Studio Code: Jupyter Notebooks

Working with Jupyter Notebooks in Visual Studio Code

Note that the file doesn't have to be a Jupyter notebook for this trick to work, you can just have #%% in your code to manually define the boundaries of cells. Other tools like Pyzo and Spyder can do this as well.

Mr. Snrub
  • 322
  • 2
  • 13