title: How to make an algorithm to string variables to convert numbers automatically?
body: <p>for example i have a df like this named sozluk.
  I want to convert this strings to numbers. I have written some code but i am really confused. </p>
  
  <pre><code>sozluk = {"column":["abc","abc","aas",
                  "aas","adas"],
  "degerler":["a","a","b","b","c"]}
  sozluk = pd.DataFrame(data=sozluk)
  
  
  #sozluk.column = [k if i=="abc" else 2 if i=="aas" else 0 for i in 
  sozluk.column]
  objects = 0
  columnss=[]
  vcounts=[]
  for i,j in enumerate(sozluk.columns):
      if sozluk[j].dtype =="object":
           objects= objects+1
           columnss.append(j)
           vcounts.append(len(sozluk[j].value_counts()))
  
   for i,j in enumerate(columnss):
       for a in range(objects):
           for k,l in enumerate(range(vcounts[i])):
               for each in sozluk.columns:
                   print(each)
                   if sozluk.loc[i,j]==sozluk[j].value_counts().index[k]:
        sozluk[columnss] = []
  </code></pre>