{"id":180,"date":"2022-09-06T14:55:11","date_gmt":"2022-09-06T06:55:11","guid":{"rendered":"http:\/\/www.hufe.org.cn\/?p=180"},"modified":"2022-09-06T14:56:20","modified_gmt":"2022-09-06T06:56:20","slug":"5%e4%b8%aa%e6%96%b9%e4%be%bf%e5%a5%bd%e7%94%a8%e7%9a%84python%e8%87%aa%e5%8a%a8%e5%8c%96%e8%84%9a%e6%9c%ac%ef%bc%88%e4%ba%8c%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.hufe.org.cn\/?p=180","title":{"rendered":"5\u4e2a\u65b9\u4fbf\u597d\u7528\u7684Python\u81ea\u52a8\u5316\u811a\u672c\uff08\u4e8c\uff09"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"heading-3\">4\u3001\u81ea\u52a8\u5316\u6570\u636e\u63a2<\/h2>\n\n\n\n<p>\u6570\u636e\u63a2\u7d22\u662f\u6570\u636e\u79d1\u5b66\u9879\u76ee\u7684\u7b2c\u4e00\u6b65\uff0c\u4f60\u9700\u8981\u4e86\u89e3\u6570\u636e\u7684\u57fa\u672c\u4fe1\u606f\u624d\u80fd\u8fdb\u4e00\u6b65\u5206\u6790\u66f4\u6df1\u7684\u4ef7\u503c\u3002<\/p>\n\n\n\n<p>\u4e00\u822c\u6211\u4eec\u4f1a\u7528<code>pandas<\/code>\u3001<code>matplotlib<\/code>\u7b49\u5de5\u5177\u6765\u63a2\u7d22\u6570\u636e\uff0c\u4f46\u9700\u8981\u81ea\u5df1\u7f16\u5199\u5927\u91cf\u4ee3\u7801\uff0c\u5982\u679c\u60f3\u63d0\u9ad8\u6548\u7387\uff0cDtale\u662f\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/p>\n\n\n\n<p>Dtale\u7279\u70b9\u662f\u7528\u4e00\u884c\u4ee3\u7801\u751f\u6210\u81ea\u52a8\u5316\u5206\u6790\u62a5\u544a\uff0c\u5b83\u7ed3\u5408\u4e86<code>Flask<\/code>\u540e\u7aef\u548cReact\u524d\u7aef\uff0c\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e00\u79cd\u67e5\u770b\u548c\u5206\u6790Pandas\u6570\u636e\u7ed3\u6784\u7684\u7b80\u4fbf\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u5728Jupyter\u4e0a\u5b9e\u7528Dtale\u3002<\/p>\n\n\n\n<p><strong>\u9700\u8981\u7684\u7b2c\u4e09\u65b9\u5e93\uff1a<\/strong><\/p>\n\n\n\n<p><strong>Dtale &#8211; \u81ea\u52a8\u751f\u6210\u5206\u6790\u62a5\u544a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>### Importing Seaborn Library For Some Datasets\r\nimport seaborn as sns\r\n \r\n### Printing Inbuilt Datasets of Seaborn Library\r\nprint(sns.get_dataset_names())\r\n \r\n \r\n### Loading Titanic Dataset\r\ndf=sns.load_dataset('titanic')\r\n \r\n### Importing The Library\r\nimport dtale\r\n \r\n#### Generating Quick Summary\r\ndtale.show(df)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202203\/202231113108480.jpg?20222111528\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"heading-4\">5\u3001\u81ea\u52a8\u684c\u9762\u63d0\u793a<\/h2>\n\n\n\n<p>\u8fd9\u4e2a\u811a\u672c\u4f1a\u81ea\u52a8\u89e6\u53d1<code>windows<\/code>\u684c\u9762\u901a\u77e5\uff0c\u63d0\u793a\u91cd\u8981\u4e8b\u9879\uff0c\u6bd4\u5982\u8bf4\uff1a\u60a8\u5df2\u5de5\u4f5c\u4e24\u5c0f\u65f6\uff0c\u8be5\u4f11\u606f\u4e86<\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u8bbe\u5b9a\u56fa\u5b9a\u65f6\u95f4\u63d0\u793a\uff0c\u6bd4\u5982\u969410\u5206\u949f\u30011\u5c0f\u65f6\u7b49<\/p>\n\n\n\n<p><strong>\u7528\u5230\u7684\u7b2c\u4e09\u65b9\u5e93\uff1a<\/strong><\/p>\n\n\n\n<p><strong>win10toast &#8211; \u7528\u4e8e\u53d1\u9001\u684c\u9762\u901a\u77e5\u7684\u5de5\u5177<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from win10toast import ToastNotifier\r\nimport time\r\ntoaster = ToastNotifier()\r\n \r\nheader = input(\"What You Want Me To Remember\\n\")\r\ntext = input(\"Releated Message\\n\")\r\ntime_min=float(input(\"In how many minutes?\\n\"))\r\n \r\ntime_min = time_min * 60\r\nprint(\"Setting up reminder..\")\r\ntime.sleep(2)\r\nprint(\"all set!\")\r\ntime.sleep(time_min)\r\ntoaster.show_toast(f\"{header}\", f\"{text}\", duration=10, threaded=True)\r\nwhile toaster.notification_active(): time.sleep(0.005)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202203\/202231113108487.png?202221114437\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>\u5c0f\u7ed3\uff1a<\/strong><\/p>\n\n\n\n<p>Python\u80fd\u5b9e\u73b0\u7684\u81ea\u52a8\u5316\u529f\u80fd\u975e\u5e38\u4e30\u5bcc\uff0c\u5982\u679c\u4f60\u53ef\u4ee5\u201c\u5077\u61d2\u201d\u7684\u9700\u6c42\u573a\u666f\u4e0d\u59a8\u8bd5\u8bd5\u3002<\/p>\n\n\n\n<p>\u5230\u6b64\u8fd9\u7bc7\u5173\u4e8e\u5206\u4eab5\u4e2a\u65b9\u4fbf\u597d\u7528\u7684Python\u81ea\u52a8\u5316\u811a\u672c\u7684\u6587\u7ae0\u5c31\u4ecb\u7ecd\u5230\u8fd9\u4e86,\u66f4\u591a\u76f8\u5173Python\u81ea\u52a8\u5316\u811a\u672c\u5185\u5bb9\u8bf7\u641c\u7d22\u811a\u672c\u4e4b\u5bb6\u4ee5\u524d\u7684\u6587\u7ae0\u6216\u7ee7\u7eed\u6d4f\u89c8\u4e0b\u9762\u7684\u76f8\u5173\u6587\u7ae0\u5e0c\u671b\u5927\u5bb6\u4ee5\u540e\u591a\u591a\u652f\u6301\u811a\u672c\u4e4b\u5bb6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>4\u3001\u81ea\u52a8\u5316\u6570\u636e\u63a2 \u6570\u636e\u63a2\u7d22\u662f\u6570\u636e\u79d1\u5b66\u9879\u76ee\u7684\u7b2c\u4e00\u6b65\uff0c\u4f60\u9700\u8981\u4e86\u89e3\u6570\u636e\u7684\u57fa\u672c\u4fe1\u606f\u624d\u80fd\u8fdb\u4e00\u6b65\u5206\u6790\u66f4\u6df1\u7684\u4ef7\u503c\u3002 \u4e00\u822c\u6211\u4eec&hellip;&nbsp;<a href=\"https:\/\/www.hufe.org.cn\/?p=180\" class=\"\" rel=\"bookmark\">\u9605\u8bfb\u66f4\u591a &raquo;<span class=\"screen-reader-text\">5\u4e2a\u65b9\u4fbf\u597d\u7528\u7684Python\u81ea\u52a8\u5316\u811a\u672c\uff08\u4e8c\uff09<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"[\"title\",\"meta\",\"thumbnail\",\"content\",\"tags\",\"comments\"]","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/180"}],"collection":[{"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180"}],"version-history":[{"count":3,"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":183,"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions\/183"}],"wp:attachment":[{"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hufe.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}