VitOne
VitOne

Reputation: 469

Changing variable name in Spyder

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.

Upvotes: 41

Views: 60421

Answers (3)

MI Alam
MI Alam

Reputation: 415

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

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

Upvotes: 0

Ludo Schmidt
Ludo Schmidt

Reputation: 1403

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

enter image description here

Upvotes: 41

Mudit Jain
Mudit Jain

Reputation: 4213

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

Upvotes: 20

Related Questions