Changing variable name in Spyder

送分小仙女□ 提交于 2020-11-26 10:24:12

问题


I have a program with many formulas and variables. I need to change the name of some of these variables. Is there any command or function in Spyder that can help me change all the names in one step?

I am looking for something like the Matlab's MAIUSC+ENTER.


回答1:


1) Select the variable you want to change, then Press CTRL + R
2) Enter the new variable name you want. (in replace by)
3) Replace all




回答2:


No way to do it currently. It's an open issue. https://github.com/spyder-ide/spyder/issues/415




回答3:


Alternatively, PyCharm can be used instead of Spyder, which is now supported in Anaconda.

In PyCharm: Select the variable > Right Click > Refactor > Rename



来源:https://stackoverflow.com/questions/23295576/changing-variable-name-in-spyder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!