{"id":4041,"date":"2024-12-19T18:32:18","date_gmt":"2024-12-19T09:32:18","guid":{"rendered":"https:\/\/secondlife.lol\/?p=4041"},"modified":"2024-12-18T18:42:09","modified_gmt":"2024-12-18T09:42:09","slug":"categorical-barplot-python","status":"publish","type":"post","link":"https:\/\/secondlife.lol\/ja\/categorical-barplot-python\/","title":{"rendered":"Python\u53ef\u8996\u5316\u3067\u30ab\u30c6\u30b4\u30ea\u578b\u30c7\u30fc\u30bf\u3092\u53ef\u8996\u5316\u3059\u308b\uff1a\u30b0\u30eb\u30fc\u30d7\u5225\u68d2\u30b0\u30e9\u30d5\u3068\u30ab\u30c6\u30b4\u30ea\u578b\u30c7\u30fc\u30bf\u306e\u4f8b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\ub370\uc774\ud130 \ubd84\uc11d\uc5d0\uc11c \uac00\uc7a5 \uae30\ubcf8\uc801\uc774\uc9c0\ub9cc \uac15\ub825\ud55c \ub3c4\uad6c \uc911 \ud558\ub098\uac00 \ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc2dc\uac01\ud654\uc785\ub2c8\ub2e4. \uc131\ubcc4, \uacb0\ud63c \uc0c1\ud0dc, \uc5f0\ub839\ub300 \ub4f1 \uadf8\ub8f9\ubcc4 \ub370\uc774\ud130\ub97c \uc2dc\uac01\ud654\ud558\uba74 \uc544\ub798 \uadf8\ub9bc\uacfc \uac19\uc774 \uc9c1\uad00\uc801\uc73c\ub85c \ubd84\ud3ec\uc640 \ucc28\uc774\ub97c \uc774\ud574\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n<style>.kb-image4041_49d3b3-14 .kb-image-has-overlay:after{opacity:0.3;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;}.kb-image4041_49d3b3-14 img.kb-img, .kb-image4041_49d3b3-14 .kb-img img{border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<div class=\"wp-block-kadence-image kb-image4041_49d3b3-14\"><figure class=\"aligncenter size-medium_large\"><img decoding=\"async\" width=\"768\" height=\"426\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-15-768x426.jpg\" alt=\"\ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc608\uc2dc \uadf8\ub798\ud504 \uc2dc\uac01\ud654\" class=\"kb-img wp-image-4043\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-15-768x426.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-15-300x166.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-15-600x333.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-15-18x10.jpg 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-15.jpg 1192w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>( \ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc608\uc2dc \uadf8\ub798\ud504 \uc2dc\uac01\ud654 )<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ubc88 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294 <strong><a href=\"http:\/\/python.org\" target=\"_blank\" rel=\"noopener\">\ud30c\uc774\uc36c<\/a>\uc758 matplotlib\ub97c \ud65c\uc6a9\ud574 \ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub97c \uadf8\ub8f9\ud654\ud558\uace0 \ub9c9\ub300 \uadf8\ub798\ud504\ub85c \uc2dc\uac01\ud654\ud558\ub294 \ubc29\ubc95<\/strong>\uc744 \ubc30\uc6c1\ub2c8\ub2e4. \ucd94\uac00\ub85c \ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc608\uc2dc\ub97c \ud1b5\ud574 \uc2e4\uc0dd\ud65c\uc5d0\uc11c \uc5b4\ub5a4 \ub370\uc774\ud130\ub97c \ub2e4\ub8f0 \uc218 \uc788\ub294\uc9c0 \ud568\uaed8 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{color:var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{color:var(--global-palette2, #2B6CB0);font-size:28px;font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list{color:var(--global-palette1, #3182CE);line-height:2em;font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list .kb-table-of-contents__entry:hover{color:var(--global-palette6, #718096);}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}@media all and (max-width: 767px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}<\/style>\n\n\n<h2 class=\"wp-block-heading\">\ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub780?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\ubc94\uc8fc\ud615 \ub370\uc774\ud130(Categorical Data)\ub294 <strong>\ud2b9\uc815 \uadf8\ub8f9\uc774\ub098 \uce74\ud14c\uace0\ub9ac\ub85c \uad6c\ubd84\ub418\ub294 \ub370\uc774\ud130\ub97c \uc758\ubbf8<\/strong>\ud569\ub2c8\ub2e4.<br>\ub300\ud45c\uc801\uc778 \uc608\uc2dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\uc131\ubcc4<\/strong>: \ub0a8\uc131, \uc5ec\uc131<\/li>\n\n\n\n<li><strong>\uc5f0\ub839\ub300<\/strong>: 10\ub300, 20\ub300, 30\ub300, 40\ub300 \uc774\uc0c1<\/li>\n\n\n\n<li><strong>\uacb0\ud63c \uc0c1\ud0dc<\/strong>: \ubbf8\ud63c, \uae30\ud63c, \uc774\ud63c, \ubb34\uc751\ub2f5<\/li>\n\n\n\n<li><strong>\uc9c0\uc5ed<\/strong>: \uc11c\uc6b8, \ubd80\uc0b0, \ub300\uad6c \ub4f1<\/li>\n\n\n\n<li><strong>\uad50\uc721 \uc218\uc900<\/strong>: \uace0\uc878, \ub300\uc878, \uc11d\uc0ac, \ubc15\uc0ac<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ub7f0 \ub370\uc774\ud130\ub97c \ubd84\uc11d\ud558\uba74 \uadf8\ub8f9 \uac04\uc758 <strong>\ucc28\uc774, \ubd84\ud3ec, \ube44\uc728<\/strong>\uc744 \uc9c1\uad00\uc801\uc73c\ub85c \uc774\ud574\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc608\uc2dc<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ubc88 \uc608\uc2dc\uc5d0\uc11c\ub294 <strong>\uacb0\ud63c \uc0c1\ud0dc<\/strong>\uc640 <strong>\uc131\ubcc4<\/strong> \ub370\uc774\ud130\ub97c \uc0ac\uc6a9\ud574 \uac01 \uadf8\ub8f9\uc758 \ubd84\ud3ec\ub97c \uc2dc\uac01\ud654\ud569\ub2c8\ub2e4. \ub2e4\uc74c\uacfc \uac19\uc740 \ubc94\uc8fc\ud615 \ub370\uc774\ud130\uac00 \uc8fc\uc5b4\uc84c\ub2e4\uace0 \uac00\uc815\ud574 \ubd05\uc2dc\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-center\" data-align=\"center\"><strong>\uc131\ubcc4<\/strong><\/th><th class=\"has-text-align-center\" data-align=\"center\"><strong>\uacb0\ud63c \uc0c1\ud0dc<\/strong><\/th><th class=\"has-text-align-center\" data-align=\"center\"><strong>\uc778\uc6d0 \uc218<\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\ub0a8\uc131<\/td><td class=\"has-text-align-center\" data-align=\"center\">\ubb34\uc751\ub2f5<\/td><td class=\"has-text-align-center\" data-align=\"center\">700<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\uc5ec\uc131<\/td><td class=\"has-text-align-center\" data-align=\"center\">\ubb34\uc751\ub2f5<\/td><td class=\"has-text-align-center\" data-align=\"center\">1000<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\ub0a8\uc131<\/td><td class=\"has-text-align-center\" data-align=\"center\">\uc774\ud63c<\/td><td class=\"has-text-align-center\" data-align=\"center\">200<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\uc5ec\uc131<\/td><td class=\"has-text-align-center\" data-align=\"center\">\uc774\ud63c<\/td><td class=\"has-text-align-center\" data-align=\"center\">250<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\ub0a8\uc131<\/td><td class=\"has-text-align-center\" data-align=\"center\">\uacb0\ud63c<\/td><td class=\"has-text-align-center\" data-align=\"center\">3200<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\uc5ec\uc131<\/td><td class=\"has-text-align-center\" data-align=\"center\">\uacb0\ud63c<\/td><td class=\"has-text-align-center\" data-align=\"center\">2400<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\uc131\ubcc4<\/strong>: \ub0a8\uc131(Male)\uacfc \uc5ec\uc131(Female)\uc73c\ub85c \uad6c\ubd84<\/li>\n\n\n\n<li><strong>\uacb0\ud63c \uc0c1\ud0dc<\/strong>: \ubb34\uc751\ub2f5(No Response), \uc774\ud63c(Divorce), \uacb0\ud63c(Married)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774 \ub370\uc774\ud130\ub97c <strong>\uadf8\ub8f9\ubcc4 \ub9c9\ub300 \uadf8\ub798\ud504<\/strong>\ub85c \uadf8\ub824\uc11c \uc2dc\uac01\ud654\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud30c\uc774\uc36c \ucf54\ub4dc \uc608\uc81c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\uc544\ub798\ub294 \uc704 \ub370\uc774\ud130\ub97c \uae30\ubc18\uc73c\ub85c \ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub97c \uc2dc\uac01\ud654\ud558\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt  \nimport pandas as pd  \nimport numpy as np  \n\n# \ub370\uc774\ud130 \uc0dd\uc131  \ndata = {'Gender': &#91;'Male', 'Female', 'Male', 'Female', 'Male', 'Female'],  \n        'Marital_Status': &#91;'No Response', 'No Response', 'Divorce', 'Divorce', 'Married', 'Married'],  \n        'Count': &#91;700, 1000, 200, 250, 3200, 2400]}  \n\n# \ub370\uc774\ud130\ud504\ub808\uc784 \uc0dd\uc131  \ndf = pd.DataFrame(data)  \n\n# \uacb0\ud63c \uc720\ubb34\ubcc4 \ub370\uc774\ud130 \ub098\ub204\uae30  \nno_response = df&#91;df&#91;'Marital_Status'] == 'No Response']  \ndivorce = df&#91;df&#91;'Marital_Status'] == 'Divorce']  \nmarried = df&#91;df&#91;'Marital_Status'] == 'Married']  \n\n# \uadf8\ub798\ud504 \uadf8\ub9ac\uae30  \nfig, axes = plt.subplots(1, 3, figsize=(12, 5), sharey=True)  \n\n# \uccab \ubc88\uc9f8 \uadf8\ub798\ud504: \uacb0\ud63c \uc0c1\ud0dc = \ubb34\uc751\ub2f5  \naxes&#91;0].bar(no_response&#91;'Gender'], no_response&#91;'Count'], color=&#91;'#1f77b4', '#aec7e8'])  \naxes&#91;0].set_title(\"Marital Status = No Response\")  \naxes&#91;0].set_xlabel(\"Gender\")  \naxes&#91;0].set_ylabel(\"Count\")  \n\n# \ub450 \ubc88\uc9f8 \uadf8\ub798\ud504: \uacb0\ud63c \uc0c1\ud0dc = \uc774\ud63c  \naxes&#91;1].bar(divorce&#91;'Gender'], divorce&#91;'Count'], color=&#91;'#1f77b4', '#aec7e8'])  \naxes&#91;1].set_title(\"Marital Status = Divorce\")  \naxes&#91;1].set_xlabel(\"Gender\")  \n\n# \uc138 \ubc88\uc9f8 \uadf8\ub798\ud504: \uacb0\ud63c \uc0c1\ud0dc = \uacb0\ud63c  \naxes&#91;2].bar(married&#91;'Gender'], married&#91;'Count'], color=&#91;'#1f77b4', '#aec7e8'])  \naxes&#91;2].set_title(\"Marital Status = Married\")  \naxes&#91;2].set_xlabel(\"Gender\")  \n\n# \uacf5\ud1b5 \uc124\uc815  \nfor ax in axes:  \n    ax.set_xticks(np.arange(len(df&#91;'Gender'].unique())))  \n    ax.set_xticklabels(&#91;'Male', 'Female'], fontsize=10)  \n    ax.spines&#91;'top'].set_visible(False)  \n    ax.spines&#91;'right'].set_visible(False)  \n\n# \ub808\uc774\uc544\uc6c3 \uc870\uc815  \nplt.tight_layout()  \n\n# \uadf8\ub798\ud504 \ucd9c\ub825  \nplt.show()\n<\/code><\/pre>\n\n\n<style>.kb-image4041_2a7e9a-13 .kb-image-has-overlay:after{opacity:0.3;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;}.kb-image4041_2a7e9a-13 img.kb-img, .kb-image4041_2a7e9a-13 .kb-img img{border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<div class=\"wp-block-kadence-image kb-image4041_2a7e9a-13\"><figure class=\"aligncenter size-medium_large\"><img decoding=\"async\" width=\"768\" height=\"403\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-16-768x403.jpg\" alt=\"\ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc2dc\uac01\ud654 \ub2e8\uacc4 \uadf8\ub9bc\" class=\"kb-img wp-image-4046\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-16-768x403.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-16-300x158.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-16-600x315.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-16-18x9.jpg 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/image-1-16.jpg 1200w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\ucf54\ub4dc \uac04\ub7b5 \ud574\uc124<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\ub370\uc774\ud130 \uc0dd\uc131<\/strong>\n<ul class=\"wp-block-list\">\n<li>\uc131\ubcc4, \uacb0\ud63c \uc0c1\ud0dc, \uc778\uc6d0 \uc218 \ub370\uc774\ud130\ub97c \ub515\uc154\ub108\ub9ac \ud615\ud0dc\ub85c \uc124\uc815\ud558\uace0 <code>pandas<\/code> DataFrame\uc73c\ub85c \ub9cc\ub4ed\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\ub370\uc774\ud130 \uadf8\ub8f9\ud654<\/strong>\n<ul class=\"wp-block-list\">\n<li><code>No Response<\/code>, <code>Divorce<\/code>, <code>Married<\/code> \uacb0\ud63c \uc0c1\ud0dc\ubcc4 \ub370\uc774\ud130\ub97c \ud544\ud130\ub9c1\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\uadf8\ub798\ud504 \uc0dd\uc131<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>3\uac1c\uc758 \uc11c\ube0c\ud50c\ub86f<\/strong>\uc744 \ub9cc\ub4e4\uace0 \uac01 \uc11c\ube0c\ud50c\ub86f\uc5d0 <code>bar()<\/code>\ub97c \uc774\uc6a9\ud574 \ub9c9\ub300 \uadf8\ub798\ud504\ub97c \uadf8\ub9bd\ub2c8\ub2e4.<\/li>\n\n\n\n<li>X\ucd95\uc5d0\ub294 \uc131\ubcc4\uc744, Y\ucd95\uc5d0\ub294 \uc778\uc6d0 \uc218\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\ub808\uc774\uc544\uc6c3 \uc124\uc815<\/strong>\n<ul class=\"wp-block-list\">\n<li><code>tight_layout()<\/code>\uc73c\ub85c \uc11c\ube0c\ud50c\ub86f \uac04\uc758 \uac04\uaca9\uc744 \uc870\uc815\ud558\uace0 \uae54\ub054\ud558\uac8c \uc815\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\ubc94\uc8fc\ud615 \ub370\uc774\ud130 \ud65c\uc6a9 \ud301<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub294 <strong>\ube44\uc988\ub2c8\uc2a4, \ud1b5\uacc4 \ubd84\uc11d, \uc124\ubb38 \uc870\uc0ac \ub4f1 \ub2e4\uc591\ud55c \ubd84\uc57c<\/strong>\uc5d0\uc11c \ud65c\uc6a9\ub429\ub2c8\ub2e4. \uac01 \ubd84\uc57c\uc5d0\uc11c \uc5b4\ub5bb\uac8c \ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub97c \ud65c\uc6a9\ud574 \uc758\ubbf8 \uc788\ub294 \uc778\uc0ac\uc774\ud2b8\ub97c \uc5bb\uc744 \uc218 \uc788\ub294\uc9c0 \uc544\ub798 \uc608\uc2dc\ub97c \ud1b5\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \ube44\uc988\ub2c8\uc2a4 \uc778\uc0ac\uc774\ud2b8 \ub3c4\ucd9c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\uc81c\ud488 \uad6c\ub9e4 \ub370\uc774\ud130<\/strong>\ub098 <strong>\uace0\uac1d \ud589\ub3d9 \ub370\uc774\ud130<\/strong>\ub97c \ubd84\uc11d\ud558\uba74 \uace0\uac1d \uadf8\ub8f9\ubcc4 \ud2b9\uc131\uc744 \ud30c\uc545\ud558\uace0 \ube44\uc988\ub2c8\uc2a4 \uc804\ub7b5\uc744 \uc218\ub9bd\ud558\ub294 \ub370 \uc720\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\ud65c\uc6a9 \uc0ac\ub840<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\uc131\ubcc4 \ubc0f \ub098\uc774\ub300\ubcc4 \uad6c\ub9e4 \ube44\uc728 \ubd84\uc11d<\/strong>\n<ul class=\"wp-block-list\">\n<li>\uc608\ub97c \ub4e4\uc5b4 \ud2b9\uc815 \uc81c\ud488\uc758 \uad6c\ub9e4 \ube44\uc728\uc744 \uc131\ubcc4(\ub0a8\uc131, \uc5ec\uc131)\uacfc \ub098\uc774\ub300(20\ub300, 30\ub300, 40\ub300 \ub4f1)\ub85c \ub098\ub204\uc5b4 \uc2dc\uac01\ud654\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\uacb0\uacfc\uc801\uc73c\ub85c \uc5b4\ub290 \uadf8\ub8f9\uc5d0\uc11c \uac00\uc7a5 \ub9ce\uc740 \uad6c\ub9e4\uac00 \ubc1c\uc0dd\ud558\ub294\uc9c0 \ud655\uc778\ud574 \ud0c0\uac9f \ub9c8\ucf00\ud305 \uc804\ub7b5\uc744 \uc138\uc6b8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\uc9c0\uc5ed\ubcc4 \ub9e4\ucd9c \ubd84\uc11d<\/strong>\n<ul class=\"wp-block-list\">\n<li>\ud2b9\uc815 \uc81c\ud488\uc774\ub098 \uc11c\ube44\uc2a4\uc758 \ub9e4\ucd9c \ub370\uc774\ud130\ub97c \uc9c0\uc5ed\ubcc4\ub85c \ub098\ub204\uc5b4 \uc2dc\uac01\ud654\ud558\uba74 <strong>\uc9c0\uc5ed \ud2b9\uc131\uc5d0 \ub9de\ub294 \ud310\ub9e4 \uc804\ub7b5<\/strong>\uc744 \uc138\uc6b8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\uc608: \uc11c\uc6b8 \uc9c0\uc5ed\uc5d0\uc11c \ud2b9\uc815 \uc81c\ud488\uc758 \ud310\ub9e4\uac00 \ub192\uc744 \uacbd\uc6b0, \ud574\ub2f9 \uc9c0\uc5ed\uc5d0 \uc9d1\uc911\uc801\uc778 \uad11\uace0\ub97c \uc9c4\ud589\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. \uc0ac\ud68c \ud1b5\uacc4 \ubd84\uc11d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\uc778\uad6c \ud1b5\uacc4 \ub370\uc774\ud130<\/strong>\ub97c \ubd84\uc11d\ud558\uba74 \uc0ac\ud68c\uc801 \ud2b9\uc131\uacfc \ubcc0\ud654\ub97c \ud30c\uc545\ud558\ub294 \ub370 \ud070 \ub3c4\uc6c0\uc774 \ub429\ub2c8\ub2e4. \ud2b9\ud788 \uacb0\ud63c \uc0c1\ud0dc, \uad50\uc721 \uc218\uc900, \uc9c0\uc5ed\ubcc4 \ubd84\ud3ec \ub4f1\uc740 \uc815\ucc45 \uc218\ub9bd\uc774\ub098 \uc5f0\uad6c\uc5d0 \uc720\uc6a9\ud55c \ub370\uc774\ud130\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\ud65c\uc6a9 \uc0ac\ub840<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\uacb0\ud63c \uc0c1\ud0dc \ubd84\uc11d<\/strong>\n<ul class=\"wp-block-list\">\n<li>\uacb0\ud63c, \uc774\ud63c, \ubbf8\ud63c \ube44\uc728\uc744 \ub098\uc774\ub300\ub098 \uc9c0\uc5ed\ubcc4\ub85c \uc2dc\uac01\ud654\ud558\uba74 \ud2b9\uc815 \uadf8\ub8f9\uc758 \uc0ac\ud68c\uc801 \ubcc0\ud654\ub97c \uc774\ud574\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\uc608: \ud2b9\uc815 \uc9c0\uc5ed\uc5d0\uc11c \uc774\ud63c\uc728\uc774 \ub192\ub2e4\uba74 \ud574\ub2f9 \uc9c0\uc5ed\uc5d0 \ub300\ud55c \ubcf5\uc9c0 \uc815\ucc45\uc774 \ud544\uc694\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\uad50\uc721 \uc218\uc900\ubcc4 \uc18c\ub4dd \ubd84\ud3ec \ubd84\uc11d<\/strong>\n<ul class=\"wp-block-list\">\n<li>\uad50\uc721 \uc218\uc900(\uace0\uc878, \ub300\uc878, \uc11d\uc0ac \ub4f1)\uc5d0 \ub530\ub978 \uc18c\ub4dd \uc218\uc900\uc744 \uc2dc\uac01\ud654\ud558\uba74 <strong>\uad50\uc721\uc774 \uc18c\ub4dd\uc5d0 \ubbf8\uce58\ub294 \uc601\ud5a5<\/strong>\uc744 \ubd84\uc11d\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. \uc124\ubb38\uc870\uc0ac \uacb0\uacfc \ubd84\uc11d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\uc124\ubb38\uc870\uc0ac \ub370\uc774\ud130<\/strong>\ub97c \uc2dc\uac01\ud654\ud558\uba74 \ud2b9\uc815 \uadf8\ub8f9\uc758 \uc120\ud638\ub3c4\ub098 \uc758\uacac\uc744 \uba85\ud655\ud788 \ud30c\uc545\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\ud65c\uc6a9 \uc0ac\ub840<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\uc81c\ud488 \ub9cc\uc871\ub3c4 \uc870\uc0ac<\/strong>\n<ul class=\"wp-block-list\">\n<li>\uc81c\ud488 \ub9cc\uc871\ub3c4\ub97c \uc131\ubcc4, \uc5f0\ub839\ub300\ubcc4\ub85c \ubd84\uc11d\ud574 \ud2b9\uc815 \uadf8\ub8f9\uc758 \uc758\uacac\uc744 \uc218\uc9d1\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\uc608: \ub0a8\uc131 30\ub300 \uadf8\ub8f9\uc5d0\uc11c \uc81c\ud488 \ub9cc\uc871\ub3c4\uac00 \ub0ae\ub2e4\uba74 \ud574\ub2f9 \uadf8\ub8f9\uc758 \ud53c\ub4dc\ubc31\uc744 \uae30\ubc18\uc73c\ub85c \uc81c\ud488 \uac1c\uc120\uc774 \ud544\uc694\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\uc18c\ube44\uc790 \uc120\ud638\ub3c4 \ubd84\uc11d<\/strong>\n<ul class=\"wp-block-list\">\n<li>\ud2b9\uc815 \uc81c\ud488\uc774\ub098 \uc11c\ube44\uc2a4\uc5d0 \ub300\ud55c \uc120\ud638\ub3c4\ub97c \ubc94\uc8fc\ubcc4(\uc9c0\uc5ed, \uc131\ubcc4 \ub4f1)\ub85c \ubd84\uc11d\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\uc608: A\uc9c0\uc5ed \uace0\uac1d\uc774 B\uc9c0\uc5ed\ubcf4\ub2e4 \ud2b9\uc815 \uc11c\ube44\uc2a4\uc5d0 \ub354 \ub192\uc740 \ub9cc\uc871\ub3c4\ub97c \ubcf4\uc778\ub2e4\uba74 \ud574\ub2f9 \uc9c0\uc5ed\uc5d0 \ub9c8\ucf00\ud305\uc744 \uc9d1\uc911\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\ub9c8\ubb34\ub9ac<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ubc88 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294 <strong>\ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub97c \uc2dc\uac01\ud654\ud558\ub294 \ubc29\ubc95<\/strong>\uc744 \ubc30\uc6e0\uc2b5\ub2c8\ub2e4. <code>matplotlib<\/code>\uc744 \ud65c\uc6a9\ud558\uba74 \ub2e4\uc591\ud55c \ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub97c \ub9c9\ub300 \uadf8\ub798\ud504\ub85c \uc190\uc27d\uac8c \uc2dc\uac01\ud654\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc2e4\uc81c \ub370\uc774\ud130\ub97c \ud65c\uc6a9\ud574 \ubd84\uc11d\ud558\uace0 \ub2e4\uc591\ud55c \uadf8\ub8f9\ud654 \uc870\uac74\uc744 \uc2dc\ub3c4\ud574 \ubcf4\uc138\uc694. \uc2dc\uac01\ud654\ub294 \ub370\uc774\ud130\ub97c \ud574\uc11d\ud558\uace0 \uc778\uc0ac\uc774\ud2b8\ub97c \uc5bb\ub294 \uac15\ub825\ud55c \ub3c4\uad6c\uac00 \ub420 \uac83\uc785\ub2c8\ub2e4!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud30c\uc774\uc36c \uc2dc\uac01\ud654 \ud558\ub294 \uac83\uc5d0 \ud765\ubbf8\uac00 \uc788\uc73c\uc2dc\ub2e4\uba74, <a href=\"https:\/\/secondlife.lol\/donut-chart-python-visualization\/\" data-type=\"post\" data-id=\"4014\">\ud30c\uc774\uc36c \uc2dc\uac01\ud654\ub85c \ubc30\uc6b0\ub294 \ub3c4\ub11b \ucc28\ud2b8 \uadf8\ub9ac\uae30\uc640 \uc911\ucca9 \ubc29\ubc95<\/a> \ud3ec\uc2a4\ud2b8\ub97c \ubcf4\uc2dc\uace0 \uad00\ub828 \uc9c0\uc2dd\uc744 \uc313\uc544\ubcf4\uc138\uc694!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"># \ucf54\ub4dc \uc0c1\uc138 \ud574\uc124<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">1. \ub77c\uc774\ube0c\ub7ec\ub9ac \ubd88\ub7ec\uc624\uae30<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt  \nimport pandas as pd  \nimport numpy as np  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>matplotlib.pyplot<\/code><\/strong>: \uadf8\ub798\ud504 \ubc0f \uc2dc\uac01\ud654\ub97c \uc704\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>pandas<\/code><\/strong>: \ub370\uc774\ud130\ud504\ub808\uc784\uc744 \uc0dd\uc131\ud558\uace0 \ub370\uc774\ud130\ub97c \ub2e4\ub8f0 \uc218 \uc788\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>numpy<\/code><\/strong>: \uc218\uce58 \uc5f0\uc0b0 \ubc0f \ubc30\uc5f4 \ub370\uc774\ud130\ub97c \ub2e4\ub8e8\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">2. \ub370\uc774\ud130 \uc0dd\uc131<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>data = {'Gender': &#91;'Male', 'Female', 'Male', 'Female', 'Male', 'Female'],  \n        'Marital_Status': &#91;'No Response', 'No Response', 'Divorce', 'Divorce', 'Married', 'Married'],  \n        'Count': &#91;700, 1000, 200, 250, 3200, 2400]}  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>data<\/code> \ub515\uc154\ub108\ub9ac<\/strong>: \uc2dc\uac01\ud654\ud560 \ub370\uc774\ud130\ub97c \ub515\uc154\ub108\ub9ac \ud615\ud0dc\ub85c \ub9cc\ub4ed\ub2c8\ub2e4.\n<ul class=\"wp-block-list\">\n<li><strong><code>Gender<\/code><\/strong>: \uc131\ubcc4\uc744 \ub098\ud0c0\ub0b4\uba70 &#8216;Male'(\ub0a8\uc131)\uacfc &#8216;Female'(\uc5ec\uc131) \ub450 \uadf8\ub8f9\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>Marital_Status<\/code><\/strong>: \uacb0\ud63c \uc0c1\ud0dc\ub97c \ubc94\uc8fc\ud615 \ub370\uc774\ud130\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. (No Response, Divorce, Married)<\/li>\n\n\n\n<li><strong><code>Count<\/code><\/strong>: \uac01 \uadf8\ub8f9\uc758 \uc778\uc6d0 \uc218\ub97c \ub098\ud0c0\ub0c5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">3. \ub370\uc774\ud130\ud504\ub808\uc784 \uc0dd\uc131<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>df = pd.DataFrame(data)  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>pd.DataFrame()<\/code><\/strong>: \uc704\uc5d0\uc11c \ub9cc\ub4e0 <code>data<\/code> \ub515\uc154\ub108\ub9ac\ub97c <strong>DataFrame<\/strong> \ud615\ud0dc\ub85c \ubcc0\ud658\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\uacb0\uacfc\uc801\uc73c\ub85c \ud14c\uc774\ube14 \ud615\ud0dc\uc758 \ub370\uc774\ud130\uac00 \uc0dd\uc131\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\ucd9c\ub825 \uc608\uc2dc<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Gender<\/strong><\/th><th><strong>Marital_Status<\/strong><\/th><th><strong>Count<\/strong><\/th><\/tr><\/thead><tbody><tr><td>Male<\/td><td>No Response<\/td><td>700<\/td><\/tr><tr><td>Female<\/td><td>No Response<\/td><td>1000<\/td><\/tr><tr><td>Male<\/td><td>Divorce<\/td><td>200<\/td><\/tr><tr><td>Female<\/td><td>Divorce<\/td><td>250<\/td><\/tr><tr><td>Male<\/td><td>Married<\/td><td>3200<\/td><\/tr><tr><td>Female<\/td><td>Married<\/td><td>2400<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">4. \uacb0\ud63c \uc0c1\ud0dc\ubcc4 \ub370\uc774\ud130 \ub098\ub204\uae30<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>no_response = df&#91;df&#91;'Marital_Status'] == 'No Response']  \ndivorce = df&#91;df&#91;'Marital_Status'] == 'Divorce']  \nmarried = df&#91;df&#91;'Marital_Status'] == 'Married']  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\uc870\uac74 \ud544\ud130\ub9c1<\/strong>: DataFrame\uc758 <code>Marital_Status<\/code> \uceec\ub7fc\uc744 \uae30\uc900\uc73c\ub85c \ub370\uc774\ud130\ub97c \ub098\ub215\ub2c8\ub2e4.\n<ul class=\"wp-block-list\">\n<li><strong><code>df[df['Marital_Status'] == 'No Response']<\/code><\/strong>: \uacb0\ud63c \uc0c1\ud0dc\uac00 &#8216;No Response&#8217;\uc778 \ud589\ub9cc \ucd94\ucd9c\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>df[df['Marital_Status'] == 'Divorce']<\/code><\/strong>: \uacb0\ud63c \uc0c1\ud0dc\uac00 &#8216;Divorce&#8217;\uc778 \ud589\ub9cc \ucd94\ucd9c\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>df[df['Marital_Status'] == 'Married']<\/code><\/strong>: \uacb0\ud63c \uc0c1\ud0dc\uac00 &#8216;Married&#8217;\uc778 \ud589\ub9cc \ucd94\ucd9c\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">5. \uc11c\ube0c\ud50c\ub86f \uc0dd\uc131<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>fig, axes = plt.subplots(1, 3, figsize=(12, 5), sharey=True)  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>plt.subplots()<\/code><\/strong>: \uc5ec\ub7ec \uac1c\uc758 \uadf8\ub798\ud504(\uc11c\ube0c\ud50c\ub86f)\ub97c \ub3d9\uc2dc\uc5d0 \uadf8\ub9b4 \uc218 \uc788\ub3c4\ub85d \uc124\uc815\ud569\ub2c8\ub2e4.\n<ul class=\"wp-block-list\">\n<li><strong><code>1, 3<\/code><\/strong>: 1\ud589 3\uc5f4\uc758 \uc11c\ube0c\ud50c\ub86f\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>figsize=(12, 5)<\/code><\/strong>: \uc804\uccb4 \uadf8\ub798\ud504\uc758 \uac00\ub85c, \uc138\ub85c \ud06c\uae30\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>sharey=True<\/code><\/strong>: Y\ucd95 \uac12\uc744 \ubaa8\ub4e0 \uc11c\ube0c\ud50c\ub86f\uc5d0\uc11c \uacf5\uc720\ud558\ub3c4\ub85d \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">6. \uccab \ubc88\uc9f8 \uadf8\ub798\ud504: No Response<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>axes&#91;0].bar(no_response&#91;'Gender'], no_response&#91;'Count'], color=&#91;'#1f77b4', '#aec7e8'])  \naxes&#91;0].set_title(\"Marital Status = No Response\")  \naxes&#91;0].set_xlabel(\"Gender\")  \naxes&#91;0].set_ylabel(\"Count\")  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>axes[0].bar()<\/code><\/strong>: \uccab \ubc88\uc9f8 \uc11c\ube0c\ud50c\ub86f\uc5d0 \ub9c9\ub300 \uadf8\ub798\ud504\ub97c \uadf8\ub9bd\ub2c8\ub2e4.\n<ul class=\"wp-block-list\">\n<li><strong><code>no_response['Gender']<\/code><\/strong>: X\ucd95 \uac12\uc73c\ub85c \uc131\ubcc4(&#8216;Male&#8217;, &#8216;Female&#8217;)\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>no_response['Count']<\/code><\/strong>: Y\ucd95 \uac12\uc73c\ub85c \uac01 \uc131\ubcc4\uc758 \uc778\uc6d0 \uc218\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>color<\/code><\/strong>: \ub9c9\ub300\uc758 \uc0c9\uc0c1\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.\n<ul class=\"wp-block-list\">\n<li><code>'#1f77b4'<\/code>: \uc9c4\ud55c \ud30c\ub780\uc0c9 (\ub0a8\uc131)<\/li>\n\n\n\n<li><code>'#aec7e8'<\/code>: \uc5f0\ud55c \ud30c\ub780\uc0c9 (\uc5ec\uc131)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong><code>set_title()<\/code><\/strong>: \uc11c\ube0c\ud50c\ub86f\uc758 \uc81c\ubaa9\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>set_xlabel()<\/code><\/strong>: X\ucd95 \ub808\uc774\ube14\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>set_ylabel()<\/code><\/strong>: Y\ucd95 \ub808\uc774\ube14\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">7. \ub450 \ubc88\uc9f8 \uadf8\ub798\ud504: Divorce<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>axes&#91;1].bar(divorce&#91;'Gender'], divorce&#91;'Count'], color=&#91;'#1f77b4', '#aec7e8'])  \naxes&#91;1].set_title(\"Marital Status = Divorce\")  \naxes&#91;1].set_xlabel(\"Gender\")  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>axes[1]<\/code><\/strong>: \ub450 \ubc88\uc9f8 \uc11c\ube0c\ud50c\ub86f\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ub370\uc774\ud130<\/strong>: \uacb0\ud63c \uc0c1\ud0dc\uac00 &#8216;Divorce&#8217;\uc778 \uadf8\ub8f9\uc758 \uc131\ubcc4\uacfc \uc778\uc6d0 \uc218\ub97c \uc2dc\uac01\ud654\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>X\ucd95\/Y\ucd95 \uc124\uc815<\/strong>: \uccab \ubc88\uc9f8 \uadf8\ub798\ud504\uc640 \ub3d9\uc77c\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">8. \uc138 \ubc88\uc9f8 \uadf8\ub798\ud504: Married<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>axes&#91;2].bar(married&#91;'Gender'], married&#91;'Count'], color=&#91;'#1f77b4', '#aec7e8'])  \naxes&#91;2].set_title(\"Marital Status = Married\")  \naxes&#91;2].set_xlabel(\"Gender\")  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>axes[2]<\/code><\/strong>: \uc138 \ubc88\uc9f8 \uc11c\ube0c\ud50c\ub86f\uc785\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ub370\uc774\ud130<\/strong>: \uacb0\ud63c \uc0c1\ud0dc\uac00 &#8216;Married&#8217;\uc778 \uadf8\ub8f9\uc758 \uc131\ubcc4\uacfc \uc778\uc6d0 \uc218\ub97c \uc2dc\uac01\ud654\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">9. \uacf5\ud1b5 \uc124\uc815<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>for ax in axes:  \n    ax.set_xticks(np.arange(len(df&#91;'Gender'].unique())))  \n    ax.set_xticklabels(&#91;'Male', 'Female'], fontsize=10)  \n    ax.spines&#91;'top'].set_visible(False)  \n    ax.spines&#91;'right'].set_visible(False)  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>for ax in axes<\/code><\/strong>: \uac01 \uc11c\ube0c\ud50c\ub86f\uc5d0 \uacf5\ud1b5\ub41c \uc124\uc815\uc744 \uc801\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>X\ucd95 \ub208\uae08 \uc124\uc815<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>np.arange(len(df['Gender'].unique()))<\/code>: \uc131\ubcc4\uc774 2\uac1c(&#8216;Male&#8217;, &#8216;Female&#8217;)\uc774\ubbc0\ub85c \ub208\uae08\uc744 2\uac1c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><code>set_xticklabels()<\/code>: X\ucd95 \ub808\uc774\ube14\uc744 &#8216;Male&#8217;\uacfc &#8216;Female&#8217;\ub85c \ud45c\uc2dc\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\ud14c\ub450\ub9ac \uc81c\uac70<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong><code>spines['top'].set_visible(False)<\/code><\/strong>: \uc0c1\ub2e8 \ud14c\ub450\ub9ac\ub97c \uc81c\uac70\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>spines['right'].set_visible(False)<\/code><\/strong>: \uc624\ub978\ucabd \ud14c\ub450\ub9ac\ub97c \uc81c\uac70\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">10. \ub808\uc774\uc544\uc6c3 \ubc0f \uadf8\ub798\ud504 \ucd9c\ub825<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>plt.tight_layout()  \nplt.show()  \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>tight_layout()<\/code><\/strong>: \uc11c\ube0c\ud50c\ub86f \uac04\uc758 \uac04\uaca9\uc744 \uc790\ub3d9\uc73c\ub85c \uc870\uc815\ud574 \uadf8\ub798\ud504\uac00 \uacb9\uce58\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong><code>plt.show()<\/code><\/strong>: \uadf8\ub798\ud504\ub97c \ud654\uba74\uc5d0 \ucd9c\ub825\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30fc\u30bf\u5206\u6790\u3067\u6700\u3082\u57fa\u672c\u7684\u3067\u3042\u308a\u306a\u304c\u3089\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u306e\u4e00\u3064\u304c\u30ab\u30c6\u30b4\u30ea\u578b\u30c7\u30fc\u30bf\u5206\u6790\u3067\u3059\u3002<\/p>","protected":false},"author":3,"featured_media":4050,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[3],"tags":[162,623,177,622,450],"class_list":["post-4041","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-coding","tag-matplotlib","tag-623","tag-177","tag-622","tag-450"],"taxonomy_info":{"category":[{"value":3,"label":"\ud30c\uc774\uc36c(Python)"}],"post_tag":[{"value":162,"label":"Matplotlib"},{"value":623,"label":"\uadf8\ub8f9\ubcc4 \ub9c9\ub300\uadf8\ub798\ud504"},{"value":177,"label":"\ub370\uc774\ud130 \ubd84\uc11d"},{"value":622,"label":"\ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc608\uc2dc"},{"value":450,"label":"\ud30c\uc774\uc36c \uc2dc\uac01\ud654"}]},"featured_image_src_large":["https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/12\/\ubc94\uc8fc\ud615-\ub370\uc774\ud130-\uc608\uc2dc-\uc2dc\uac01\ud654-\uadf8\ub798\ud504-\ud3ec\uc2a4\ud2b8-\uc378\ub124\uc77c-600x600.jpg",600,600,true],"author_info":{"display_name":"TERE","author_link":"https:\/\/secondlife.lol\/ja\/author\/tere\/"},"comment_info":0,"category_info":[{"term_id":3,"name":"\ud30c\uc774\uc36c(Python)","slug":"python-coding","term_group":0,"term_taxonomy_id":3,"taxonomy":"category","description":"","parent":20,"count":118,"filter":"raw","cat_ID":3,"category_count":118,"category_description":"","cat_name":"\ud30c\uc774\uc36c(Python)","category_nicename":"python-coding","category_parent":20}],"tag_info":[{"term_id":162,"name":"Matplotlib","slug":"matplotlib","term_group":0,"term_taxonomy_id":162,"taxonomy":"post_tag","description":"","parent":0,"count":19,"filter":"raw"},{"term_id":623,"name":"\uadf8\ub8f9\ubcc4 \ub9c9\ub300\uadf8\ub798\ud504","slug":"%ea%b7%b8%eb%a3%b9%eb%b3%84-%eb%a7%89%eb%8c%80%ea%b7%b8%eb%9e%98%ed%94%84","term_group":0,"term_taxonomy_id":623,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":177,"name":"\ub370\uc774\ud130 \ubd84\uc11d","slug":"%eb%8d%b0%ec%9d%b4%ed%84%b0-%eb%b6%84%ec%84%9d","term_group":0,"term_taxonomy_id":177,"taxonomy":"post_tag","description":"","parent":0,"count":36,"filter":"raw"},{"term_id":622,"name":"\ubc94\uc8fc\ud615 \ub370\uc774\ud130 \uc608\uc2dc","slug":"%eb%b2%94%ec%a3%bc%ed%98%95-%eb%8d%b0%ec%9d%b4%ed%84%b0-%ec%98%88%ec%8b%9c","term_group":0,"term_taxonomy_id":622,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":450,"name":"\ud30c\uc774\uc36c \uc2dc\uac01\ud654","slug":"%ed%8c%8c%ec%9d%b4%ec%8d%ac-%ec%8b%9c%ea%b0%81%ed%99%94","term_group":0,"term_taxonomy_id":450,"taxonomy":"post_tag","description":"","parent":0,"count":18,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/4041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/comments?post=4041"}],"version-history":[{"count":6,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/4041\/revisions"}],"predecessor-version":[{"id":4053,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/4041\/revisions\/4053"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/media\/4050"}],"wp:attachment":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/media?parent=4041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/categories?post=4041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/tags?post=4041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}