class_docstr: Object to hold scope, with a few bells to deal with some custom syntax
  and contexts added by pandas.
  
  Parameters
  ----------
  level : int
  global_dict : dict or None, optional, default None
  local_dict : dict or Scope or None, optional, default None
  resolvers : list-like or None, optional, default None
  target : object
  
  Attributes
  ----------
  level : int
  scope : DeepChainMap
  target : object
  temps : dict
class_docstr_tok: ["Object","to","hold","scope",",","with","a","few","bells","to","deal","with","some","custom","syntax","and","contexts","added","by","pandas",".","Parameters","--","--","--","--","--","level",":","int","global_dict",":","dict","or","None",",","optional",",","default","None","local_dict",":","dict","or","Scope","or","None",",","optional",",","default","None","resolvers",":","list-like","or","None",",","optional",",","default","None","target",":","object","Attributes","--","--","--","--","--","level",":","int","scope",":","DeepChainMap","target",":","object","temps",":","dict"]
docstr: Replace a variable name, with a potentially new value.
  
  Parameters
  ----------
  old_key : str
      Current variable name to replace
  new_key : str
      New variable name to replace `old_key` with
  new_value : object
      Value to be replaced along with the possible renaming
docstr_tok: ["Replace","a","variable","name",",","with","a","potentially","new","value",".","Parameters","--","--","--","--","--","old_key",":","str","Current","variable","name","to","replace","new_key",":","str","New","variable","name","to","replace","`","old_key","`","with","new_value",":","object","Value","to","be","replaced","along","with","the","possible","renaming"]
code: def swapkey(self, old_key, new_key, new_value=None):
      """Replace a variable name, with a potentially new value.
  
      Parameters
      ----------
      old_key : str
          Current variable name to replace
      new_key : str
          New variable name to replace `old_key` with
      new_value : object
          Value to be replaced along with the possible renaming
      """
      if self.has_resolvers:
          maps = self.resolvers.maps + self.scope.maps
      else:
          maps = self.scope.maps
  
      maps.append(self.temps)
  
      for mapping in maps:
          if old_key in mapping:
              mapping[new_key] = new_value
              return
  
imports: import datetime
  import inspect
  import itertools
  import pprint
  import struct
  import sys
  import numpy
  from pandas.compat import DeepChainMap, StringIO, map
  import pandas
  from pandas.core.base import StringMixin
  import pandas.core.computation
label_desc: Use image node_id 5 for calling the Scope obj's underlying member method code with example usage: obj.swapkey(old_key, new_key, new_value) without return types