Search code examples
pythonpandasidespyder

Only run part of script in spyder IDE - Windows OS


I have a python script in spyder that reads large Excel spreadsheets

#imports

first = pd.read_excel('first.xlsx')
second = pd.read_excel('second.xlsx')

#rest_of_code

I am working on the #rest_of_code part and need to run this part for debugging etc. The spreadsheets do not change so I don't need to read them every time I'm running the script. I would like to only run the #rest_of_code portion of my script (which is using the excel spreadsheets) to speed things up. I am using sypder IDE, but not sure how to make this happen. This is for Windows OS, so can't use Mac shortcuts


Solution

  • I encountered the same problem, just select the cells you want to run and press "F9".