I am handling 303 data frames and each data frame has different name as well as contains different columns. What I want is that select specific columns of which name contain "_CD" and "_NM" from those lots of data frames. Is there any good way to deal with it?
Note, those data frames were not listed.
Here is an example (I cannot bring up the real data but show you the fake with similar format)
table 1 name: AD_ITEM_CNT;
- columns : CKND_CLSF_CD, SUBJ_CD, ITEM_CNT, UPDT_DT
table 2 name : BLAD_PE_XEXM
- columns : PT_SBST_NO, CEXM_NM, CEXM_CD, CEXM_RST, CEX_RSLT_CMNT, LDNG_DT
table 3 name : BLAD_MR_HLTH
- columns : PT_SBST_NO, RGST_DT, EDU_DGRE_CD, DRNK_YN, JOB_KIND_CD ...
The goal of this process is to create a table like the below
Table | column | CD
-----------------------------------
AD_ITEM_CNT | CKND_CLSF_CD | 01
AD_ITEM_CNT | CKND_CLSF_CD | 02
AD_ITEM_CNT | CKND_CLSF_CD | 03
AD_ITEM_CNT | CKND_CLSF_CD | 04
BLAD_PE_XEXM | CEXM_CD | AVS
BLAD_PE_XEXM | CEXM_CD | ABE
BLAD_PE_XEXM | CEXM_CD | CVS
BLAD_PE_XEXM | CEXM_CD | UVS