parameters: (s)
return_statement: return n
docstring: Translate a column name to number (e.g. 'A'->1, 'Z'->26, 'AA'->27).
docstring_summary: Translate a column name to number (e.g. 'A'->1, 'Z'->26, 'AA'->27).
docstring_tokens: Translate a column name to number ( e . g . A - > 1 Z - > 26 AA - > 27 ) .
function: def colname2num(s):
      "Translate a column name to number (e.g. 'A'->1, 'Z'->26, 'AA'->27)."
      s = s.upper()
      n = 0
      for c in s:
          assert 'A' <= c <= 'Z'
          n = n*26 + ord(c) - ord('A') + 1
      return n
function_tokens: def colname2num ( s ) : s = s . upper ( ) n = 0 for c in s : assert 'A' <= c <= 'Z' n = n * 26 + ord ( c ) - ord ( 'A' ) + 1 return n