title: How to assign int values to strings such that strings can be used with arithmetic operations
body: <p>I would like to replace numeric column names in a DataFrame with their corresponding word names but still be able to sort the column names in order such that 'two' comes before 'eight'.</p>
  <p>When learning Python, I came across a concept whereby we could say 'foo' means 3 and 'bar' means 8 such that later on in the program, <code>'foo' * 'bar'</code> will be interpreted as 3*8 .</p>
  <p>The solutions that I have come across so far (e.g <a href="https://stackoverflow.com/questions/3426108/how-to-sort-a-list-of-strings-numerically">this</a> and <a href="https://stackoverflow.com/questions/2289870/sort-strings-by-the-first-n-characters">this</a>) involved explicitly converting the strings to integers before carrying out operations but I would like to assign numeric values to those strings such that python inherently knows what they represent however, I am no longer able to remember the name of the concept so my google search is not going smoothly.
  How can I do this?</p>