Combine two columns of text in dataframe in pandas/python
So I am trying to change a line with the solution given at the answer above.
For example,
Year quarter period
0 2014 q1 2014q1
1 2015 q2 2015q2
what I'd like to see in my 'period' column is not 2014q1
but
2014
q1
q1 at the bottm of 2014
I wish I could put the content of one column below the content of the different column when two contents of different columns are combined.
I have tried
dataframe["period"] = dataframe["Year"].map(str) +'\n' + dataframe["quarter"]
but it doesn't work. The code above gives me
2014 \n q1
Any advice?