How to make new column based on joining column and row in dataframe?

Viewed 14

I have dataframe like this,

Year A B
2011 23 98
2012 22 87
2013 32 34
2014 232 34
2015 443 33

How can I change above dataframe into like this ?

Year C
2011-A 23
2011-B 98
2012-A 22
2012-B 87
2013-A 32
2013-B 33
2014-A 232
2014-B 34
2015-A 443
2015-B 32
0 Answers
Related