class_docstr: Renames features following substitution rules.
  
  Parameters
  ----------
  mapping
      Dictionnary describing substitution rules. Keys in `mapping` that are not a feature's name are silently ignored.
  
  Examples
  --------
  
  >>> from river import compose
  
  >>> mapping = {'a': 'v', 'c': 'o'}
  >>> x = {'a': 42, 'b': 12}
  >>> compose.Renamer(mapping).transform_one(x)
  {'b': 12, 'v': 42}
class_docstr_tok: ["Renames","features","following","substitution","rules",".","Parameters","--","--","--","--","--","mapping","Dictionnary","describing","substitution","rules",".","Keys","in","`","mapping","`","that","are","not","a","feature","'s","name","are","silently","ignored",".","Examples","--","--","--","--",">",">",">","from","river","import","compose",">",">",">","mapping","=","{","'","a","'",":","'","v","'",",","'","c","'",":","'","o","'","}",">",">",">","x","=","{","'","a","'",":","42",",","'","b","'",":","12","}",">",">",">","compose.Renamer","(","mapping",")",".transform_one","(","x",")","{","'","b","'",":","12",",","'","v","'",":","42","}"]
code: def transform_one(self, x):
      for old_key, new_key in self.mapping.items():
          try:
              x[new_key] = x.pop(old_key)
          except KeyError:
              pass  # Ignoring keys that are not a feature's name
  
      return x
  
file_path: river/river/compose/renamer.py
imports: from __future__ import annotations
  from river import base
label_desc: Use image node_id 2 for calling the Renamer obj's underlying member method code with example usage: obj.transform_one(x) and returns: x