{"id":3787,"date":"2022-01-03T18:12:15","date_gmt":"2022-01-03T09:12:15","guid":{"rendered":"https:\/\/obenkyolab.com\/?p=3787"},"modified":"2022-01-09T10:39:41","modified_gmt":"2022-01-09T01:39:41","slug":"python%e3%81%a7attributeerror-module-pandas-has-no-attribute-scatter_matrix%e3%81%8c%e5%87%ba%e3%81%9f%e6%99%82%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95","status":"publish","type":"post","link":"https:\/\/obenkyolab.com\/?p=3787","title":{"rendered":"Python\u3067AttributeError: module &#8216;pandas&#8217; has no attribute &#8216;scatter_matrix&#8217;\u304c\u51fa\u305f\u6642\u306e\u5bfe\u51e6\u6cd5"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/obenkyolab.com\/?p=3787\/#%E6%A6%82%E8%A6%81\" >\u6982\u8981<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/obenkyolab.com\/?p=3787\/#%E6%A4%9C%E8%A8%BC%E7%92%B0%E5%A2%83\" >\u691c\u8a3c\u74b0\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/obenkyolab.com\/?p=3787\/#%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AE%E5%8E%9F%E5%9B%A0\" >\u30a8\u30e9\u30fc\u306e\u539f\u56e0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/obenkyolab.com\/?p=3787\/#%E5%AF%BE%E5%87%A6%E6%B3%95\" >\u5bfe\u51e6\u6cd5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/obenkyolab.com\/?p=3787\/#%E3%81%BE%E3%81%A8%E3%82%81\" >\u307e\u3068\u3081<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A6%82%E8%A6%81\"><\/span>\u6982\u8981<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u30aa\u30e9\u30a4\u30ea\u30fc\u306ePython\u3067\u59cb\u3081\u308b\u6a5f\u68b0\u5b66\u7fd2\u306e\u7b2c\u4e00\u7ae0\u306eIris\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30b0\u30e9\u30d5\u8868\u793a\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u52d5\u304b\u305d\u3046\u3068\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u306b\u906d\u9047\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>grr = pd.scatter_matrix(iris_dataframe, c=y_train, figsize=(15, 15), marker=&#39;o&#39;, hist_kwds={&#39;bins&#39;: 20}, s=60, alpha=.8, cmap=mglearn.cm3)\n\n--------------------------------\nAttributeError: module &#39;pandas&#39; has no attribute &#39;scatter_matrix&#39;<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u5bfe\u8c61\u3068\u3057\u305f\u66f8\u7c4d<\/strong><\/p>\n\n\n\n<iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"https:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?ref=qf_sp_asin_til&#038;t=sebone0f-22&#038;m=amazon&#038;o=9&#038;p=8&#038;l=as1&#038;IS2=1&#038;detail=1&#038;asins=4873117984&#038;linkId=cb65226a770317efa8fc24c100988708&#038;bc1=000000&amp;lt1=_blank&#038;fc1=333333&#038;lc1=0066c0&#038;bg1=ffffff&#038;f=ifr\">\n    <\/iframe>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u4e0a\u8a18\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u65b9\u6cd5\u306b\u3064\u3044\u3066\u30e1\u30e2\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A4%9C%E8%A8%BC%E7%92%B0%E5%A2%83\"><\/span>\u691c\u8a3c\u74b0\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Python 3.8.10<\/li><\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>from platform import python_version\n\nprint(python_version())\n-------------\n3.8.10<\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Pandas 1.3.5<\/li><\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import pandas as pd\n\nprint(pd.__version__)\n\n---------------\n1.3.5<\/code><\/pre><\/div>\n\n\n\n<p> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AE%E5%8E%9F%E5%9B%A0\"><\/span>\u30a8\u30e9\u30fc\u306e\u539f\u56e0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Stack OVerflow\u3092\u53c2\u8003\u306b\u3055\u305b\u3066\u3044\u305f\u3060\u3044\u305f\u3068\u3053\u308d\u3001\u3069\u3046\u3084\u3089scatter_matrix\u30e1\u30bd\u30c3\u30c9\u306fpandas\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u306f\u306a\u304f\u3001plotting\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u547c\u3073\u51fa\u3055\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u304b\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/55394041\/how-can-i-solve-module-pandas-has-no-attribute-scatter-matrix-error\">python 3.x &#8211; How can I solve &#8221; module &#8216;pandas&#8217; has no attribute &#8216;scatter_matrix&#8217; &#8221; error? &#8211; Stack Overflow<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>pandas Documation\u3092\u898b\u3066\u3082\u305d\u306e\u3088\u3046\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>pandas.plotting.scatter_matrix<\/strong><br><strong>pandas.plotting.scatter_matrix(<\/strong><em>frame<\/em><strong>,&nbsp;<\/strong><em>alpha=0.5<\/em><strong>,&nbsp;<\/strong><em>figsize=None<\/em><strong>,&nbsp;<\/strong><em>ax=None<\/em><strong>,&nbsp;<\/strong><em>grid=False<\/em><strong>,&nbsp;<\/strong><em>diagonal=&#8217;hist&#8217;<\/em><strong>,&nbsp;<\/strong><em>marker=&#8217;.&#8217;<\/em><strong>,&nbsp;<\/strong><em>density_kwds=None<\/em><strong>,&nbsp;<\/strong><em>hist_kwds=None<\/em><strong>,&nbsp;<\/strong><em>range_padding=0.05<\/em><strong>,&nbsp;<\/strong><em>**kwargs<\/em><strong>)<\/strong><\/p><cite><a href=\"https:\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.plotting.scatter_matrix.html\">pandas.plotting.scatter_matrix \u2014 pandas 1.3.5 documentation (pydata.org)<\/a><\/cite><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AF%BE%E5%87%A6%E6%B3%95\"><\/span>\u5bfe\u51e6\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u305f\u3068\u3053\u308d\u30aa\u30e9\u30a4\u30ea\u30fc\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u554f\u984c\u306a\u304f\u52d5\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>grr = pd.plotting.scatter_matrix(iris_dataframe, c=y_train, figsize=(15, 15), marker=&#39;o&#39;, hist_kwds={&#39;bins&#39;: 20}, s=60, alpha=.8, cmap=mglearn.cm3)<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%81%BE%E3%81%A8%E3%82%81\"><\/span>\u307e\u3068\u3081<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u30aa\u30e9\u30a4\u30ea\u30fc\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u304c\u60f3\u5b9a\u3057\u3066\u3044\u308bpandas\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u691c\u8a3c\u74b0\u5883\u306epandas\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u9055\u3044\u306b\u3088\u3063\u3066\u306e\u5dee\u306a\u306e\u304b\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u3068\u308a\u3042\u3048\u305a\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u30aa\u30e9\u30a4\u30ea\u30fc\u306ePython\u3067\u59cb\u3081\u308b\u6a5f\u68b0\u5b66\u7fd2\u306e\u7b2c\u4e00\u7ae0\u306eIris\u30c7\u30fc&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"https:\/\/obenkyolab.com\/?p=3787","footnotes":""},"categories":[7],"tags":[93,94],"class_list":["post-3787","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-pandas","tag-scatter_matrix","ja"],"_links":{"self":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/3787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3787"}],"version-history":[{"count":6,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/3787\/revisions"}],"predecessor-version":[{"id":4588,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/3787\/revisions\/4588"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/media\/1218"}],"wp:attachment":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}