title: Median replace the empty values in Pandas
body: <p>I have a column called Reservation some of its rows is empty and some rows have several values.
  I want to extract the letter before the numbers</p>
  
  <pre><code>print(df['Reservation'][:24])
  
  0                  NaN
  1                  NaN
  2                  NaN
  3                  NaN
  ...
  24     B57 B59 B63 B66
  </code></pre>
  
  <p>I tried this. </p>
  
  <pre><code>df['Room'] = df['Reservation'].astype(str).str[0]
  </code></pre>
  
  <p>However i get the empty values like Nan in the result.</p>
  
  <pre><code>print(df['Room'][:3])
  0     n
  1     n
  2     n
  3     n
  </code></pre>
  
  <p>The result should be something like </p>
  
  <pre><code>print(df['Room'][:1])
  
   1           B
  </code></pre>
  
  <hr>
  
  <p>Then i have the table below, some of the Days_of_Reservations are empty, so i have to fill in those embty raws with the median of the same Profission and the same Organizations.
  Like the first two raws they are Doctors from the same organizations, so themedian value should be filled in into the nan value.</p>
  
  <pre><code> Organization    Days_of_Reservations     Profission
      or3               4                   Doctor
      0r3               Nan                 Doctor
      or2               2                   Teacher
      or1               3                   Teacher
      or5               Nan                 Dentist
  </code></pre>
  
  <p>I treid this i get this error.</p>
  
  <pre><code>med = df.groupby('Days_of_Reservations')['profission']['organization'].transform('median')
  df['Days_of_Reservations'].fillna(med)
  </code></pre>
  
  <p>I get this error.</p>
  
  <pre><code>Exception: Column(s) ['profission'] already selected
  </code></pre>