|
||
0
0
red_panda
#pung#
2023-12-08 *
|
0
0
1040ÀÛÀü
df.columns ´Â Index(['class', 'cap-shape', 'cap-surface', 'cap-color', 'bruises', 'odor', 'gill-attachment', 'gill-spacing', 'gill-size', 'gill-color', 'stalk-shape', 'stalk-root', 'stalk-surface-above-ring', 'stalk-surface-below-ring', 'stalk-color-above-ring', 'stalk-color-below-ring', 'veil-type', 'veil-color', 'ring-number', 'ring-type', 'spore-print-color', 'population', 'habitat'], dtype='object') for i in df.columns:
globals()['df_{}'.format(i.replace("-",""))] = df['{}'.format(i)].value_counts()
print(globals()['df_{}'.format(i.replace("-",""))])
ÀÛ¼ºÇÑÄڵ尡 ÀÌ°ÍÀε¥... ¾Æ·¡¿Í°°ÀÌ ÇÁ¸°Æ®¸¦ ÇϱäÇߴµ¥...
¾î¶µç df_class , df_capshape , µîµîÀÇ À̸§À» ¸¸µé¾úÀ¸´Ï...
print(df_~~~) ÀÌ°ÉÀû°í½ÍÀº°Çµ¥.... globals¸¦ Ç×»óÀû¾îÁà¾ßÇÏ´ÂÁö ½Í³×¿ä
´äº¯°¨»çÇÕ´Ï´ç
2022-09-19
|
|
|
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û | -¸ñ·Ïº¸±â |
var_list=['var_1', 'var_2']
for i in var_list:
print(i)