title: Combine two columns into one one by one in Python
body: <p>If I have a data frame like this:</p>
  
  <pre><code>   id    year quarter
  0   1  2017.0      Q1
  1   2  2018.0      Q2
  2   3  2019.0      Q3
  3   4     NaN      Q4
  </code></pre>
  
  <p>How can I get a new dataframe by combining <code>year</code> and <code>period</code> together:</p>
  
  <pre><code>    id    year quarter  period
  0    1  2017.0      Q1  2017Q1
  1    2  2018.0      Q2  2017Q2
  2    3  2019.0      Q3  2017Q3
  3    4     NaN      Q4  2017Q4
  4    5     NaN     NaN  2018Q1
  5    6     NaN     NaN  2018Q2
  6    7     NaN     NaN  2018Q3
  7    8     NaN     NaN  2018Q4
  8    9     NaN     NaN  2019Q1
  9   10     NaN     NaN  2019Q2
  10  11     NaN     NaN  2019Q3
  11  12     NaN     NaN  2019Q4
  </code></pre>
  
  <p>Or just one column:</p>
  
  <pre><code>    period
  0   2017Q1
  1   2017Q2
  2   2017Q3
  3   2017Q4
  4   2018Q1
  5   2018Q2
  6   2018Q3
  7   2018Q4
  8   2019Q1
  9   2019Q2
  10  2019Q3
  11  2019Q4
  </code></pre>
  
  <p>Thank you!</p>