So as usual, I'm having a hard time describing what I'm trying to do, which I believe is why googling has been ineffective for me. So let me use some examples.
I have a primary dataset that look like this:
Table 1
Address | State | Year | PolicyType1 | PolicyType2 | PolicyType2 Detail | PolicyType3 | PolicyType3 Detail |
12 road | CA | 2006 | . | . | . | . | . |
234 st | RI | 2012 | . | . | . | . | . |
3534 ave | RI | 2007 | . | . | . | . | . |
125 road | WV | 2016 | . | . | . | . | . |
534 street | CA | 2014 | . | . | . | . | . |
2423 lane | OH | 2009 | . | . | . | . | . |
Table 2
PolicyType | State | Year | PolicyDetail2 | PolicyDetail3 |
1 | CA | 2008 | . | . |
1 | CA | 2005 | . | . |
2 | RI | 2009 | Abc | . |
3 | OH | 2001 | . | 50 |
Table 1
Address | State | Year | PolicyType1 | PolicyType2 | PolicyType2 Detail | PolicyType3 | PolicyType3 Detail |
12 road | CA | 2006 | 1 | . | . | . | . |
234 st | RI | 2012 | . | 1 | Abc | . | . |
3534 ave | RI | 2007 | . | . | . | . | . |
125 road | WV | 2016 | . | . | . | . | . |
534 street | CA | 2014 | 2 | . | . | . | . |
2423 lane | OH | 2009 | . | . | . | 1 | 50 |
Best,
Max
0 Response to Using a secondary dataset to generate new variables to main dataset given conditions
Post a Comment