I want to merge two datasets.
Both contain the same company name. But the problem is one file has multiple years.
e.g.
Company name Mgm
Alpha 1
Beta 0
Gema 1
How can I merge two data sets so that the Mgm value go in front of each year and company like this.
company name. Year Mgm
Alpha 2005 1
Aplha 2006 1
Alpha 2007 1
Alpha 2008 1
Beta 2007 0
Beta 2008 0
Beta 2009 0
Gema 2005 1
Gema 2006 1
Gema 2007 1
Gema 2008 1
Here years are not evenly distributed(some firms has years from 2005-2008 others 2006-2009 and so on.
Both contain the same company name. But the problem is one file has multiple years.
e.g.
company name. Yearother dataset contain company name and a binary variable (Mgm)
Alpha 2005
Aplha 2006
Alpha 2007
Alpha 2008
Beta 2007
Beta 2008
Beta 2009
Gema 2005
Gema 2006
Gema 2007
Gema 2008
Company name Mgm
Alpha 1
Beta 0
Gema 1
How can I merge two data sets so that the Mgm value go in front of each year and company like this.
company name. Year Mgm
Alpha 2005 1
Aplha 2006 1
Alpha 2007 1
Alpha 2008 1
Beta 2007 0
Beta 2008 0
Beta 2009 0
Gema 2005 1
Gema 2006 1
Gema 2007 1
Gema 2008 1
Here years are not evenly distributed(some firms has years from 2005-2008 others 2006-2009 and so on.