{"id":5338,"date":"2020-11-07T00:17:52","date_gmt":"2020-11-06T15:17:52","guid":{"rendered":"http:\/\/hituji1012.xsrv.jp\/?p=381"},"modified":"2026-08-01T13:57:04","modified_gmt":"2026-08-01T04:57:04","slug":"125","status":"publish","type":"post","link":"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/","title":{"rendered":"\u3010pandas\u3011pandas\u306e\u57fa\u672c\u77e5\u8b58\u3000\u57fa\u790e\u304b\u3089\u5fdc\u7528\u307e\u3067\u3010Python\u3011"},"content":{"rendered":"\n<p>python\u3067\u306f\u30c7\u30fc\u30bf\u89e3\u6790\u3092\u3088\u304f\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u4e2d\u3088\u304f\u4f7f\u3046\u30c7\u30fc\u30bf\u3068\u3044\u3048\u3070\u3001\u8868\u30c7\u30fc\u30bf\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u8868\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n<p>\u30a8\u30af\u30bb\u30eb\u306e\u30c7\u30fc\u30bf\u3060\u3063\u305f\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30fc\u30bf\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 52.5109%; height: 141px;\">\n<tbody>\n<tr style=\"height: 18px;\">\n<td style=\"width: 33.333333333333336%; text-align: center; background-color: #878787; height: 18px;\"><strong>\u5217\u540d<\/strong><\/td>\n<td style=\"width: 33.333333333333336%; text-align: center; background-color: #878787; height: 18px;\"><strong>\u5217\u540d<\/strong><\/td>\n<td style=\"width: 33.3333%; background-color: #878787; height: 18px; text-align: center;\"><strong>\u5217\u540d<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"width: 33.333333333333336%; height: 18px;\"><\/td>\n<td style=\"width: 33.333333333333336%; height: 18px;\"><\/td>\n<td style=\"width: 33.333333333333336%; height: 18px;\"><\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"width: 33.333333333333336%; height: 18px;\"><\/td>\n<td style=\"width: 33.333333333333336%; height: 18px;\"><\/td>\n<td style=\"width: 33.333333333333336%; height: 18px;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3053\u306e\u8868\u30c7\u30fc\u30bf\u3092\u7c21\u5358\u306b\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u304c\u3001pandas\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fpandas\u306b\u3064\u3044\u3066\u7fd2\u5f97\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"tGyE5tdO7R\"><p><a href=\"https:\/\/www.tetsumag.com\/2021\/01\/11\/71\/\">\u3010pandas\u3011csv\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\/\u66f8\u304d\u8fbc\u3080\u3010Python\u3011<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3010pandas\u3011csv\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\/\u66f8\u304d\u8fbc\u3080\u3010Python\u3011&#8221; &#8212; \u3066\u3064\u307e\u3050\" src=\"https:\/\/www.tetsumag.com\/2021\/01\/11\/71\/embed\/#?secret=S7aJSuaFZu#?secret=tGyE5tdO7R\" data-secret=\"tGyE5tdO7R\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u672c\u8a18\u4e8b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<br \/>\n<a href=\"http:\/\/hituji1012.xsrv.jp\/wp-content\/uploads\/2020\/11\/python11.zip\">&gt;&gt;\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9(jupyter notebook)<\/a><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_38 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u6b21<\/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\" style=\"display: none;\"><label for=\"item\" aria-label=\"Table of Content\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;\"><svg style=\"fill: #444444;color:#444444\" 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: #444444;color:#444444\" 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><\/label><input type=\"checkbox\" id=\"item\"><\/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:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#pandas%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6\" title=\"pandas\u306b\u3064\u3044\u3066\">pandas\u306b\u3064\u3044\u3066<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" title=\"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF\" title=\"\u8aad\u307f\u8fbc\u307f\">\u8aad\u307f\u8fbc\u307f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#DataFrame%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6\" title=\"DataFrame\u306b\u3064\u3044\u3066\">DataFrame\u306b\u3064\u3044\u3066<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#pandas%E3%81%AE%E5%9F%BA%E6%9C%AC%E3%80%80%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%97%E3%81%A6%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B\" title=\"pandas\u306e\u57fa\u672c\u3000\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u3066\u8a08\u7b97\u3059\u308b\">pandas\u306e\u57fa\u672c\u3000\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u3066\u8a08\u7b97\u3059\u308b<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E4%BD%9C%E3%82%8B\" title=\"\u30c7\u30fc\u30bf\u3092\u4f5c\u308b\">\u30c7\u30fc\u30bf\u3092\u4f5c\u308b<\/a><ul class='ez-toc-list-level-4'><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#values%E3%81%AE%E3%81%BF%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B%E3%81%A8%E8%87%AA%E5%8B%95%E3%81%A7columns%E3%81%A8index%E3%81%8C%E3%81%A4%E3%81%8F\" title=\"values\u306e\u307f\u3092\u6307\u5b9a\u3059\u308b\u3068\u81ea\u52d5\u3067columns\u3068index\u304c\u3064\u304f\">values\u306e\u307f\u3092\u6307\u5b9a\u3059\u308b\u3068\u81ea\u52d5\u3067columns\u3068index\u304c\u3064\u304f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#columns%E5%90%8Dindex%E5%90%8D%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B\" title=\"columns\u540d,index\u540d\u3092\u6307\u5b9a\u3059\u308b\">columns\u540d,index\u540d\u3092\u6307\u5b9a\u3059\u308b<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#CSV%E3%81%AE%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF%E3%80%81%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E7%A2%BA%E8%AA%8D\" title=\"CSV\u306e\u8aad\u307f\u8fbc\u307f\u3001\u30c7\u30fc\u30bf\u306e\u78ba\u8a8d\">CSV\u306e\u8aad\u307f\u8fbc\u307f\u3001\u30c7\u30fc\u30bf\u306e\u78ba\u8a8d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\" title=\"\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\">\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059<\/a><ul class='ez-toc-list-level-4'><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#index_columns_values%E3%82%92%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\" title=\"index, columns, values\u3092\u53d6\u308a\u51fa\u3059\">index, columns, values\u3092\u53d6\u308a\u51fa\u3059<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E5%88%97%E5%8D%98%E4%BD%8D%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\" title=\"\u5217\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059\">\u5217\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E8%A1%8C%E5%8D%98%E4%BD%8D%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\" title=\"\u884c\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059\">\u884c\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E5%BA%A7%E6%A8%99%E6%8C%87%E5%AE%9A%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99ilocloc\" title=\"\u5ea7\u6a19\u6307\u5b9a\u3067\u53d6\u308a\u51fa\u3059iloc,loc\">\u5ea7\u6a19\u6307\u5b9a\u3067\u53d6\u308a\u51fa\u3059iloc,loc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E5%87%A6%E7%90%86%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\" title=\"\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3067\u53d6\u308a\u51fa\u3059\">\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3067\u53d6\u308a\u51fa\u3059<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E8%A8%88%E7%AE%97\" title=\"\u8a08\u7b97\">\u8a08\u7b97<\/a><ul class='ez-toc-list-level-4'><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E7%B5%B1%E8%A8%88%E9%87%8F%E3%82%92%E7%A2%BA%E8%AA%8D\" title=\"\u7d71\u8a08\u91cf\u3092\u78ba\u8a8d\">\u7d71\u8a08\u91cf\u3092\u78ba\u8a8d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E5%88%97%E5%90%8C%E5%A3%AB%E3%81%AE%E8%A8%88%E7%AE%97\" title=\"\u5217\u540c\u58eb\u306e\u8a08\u7b97\">\u5217\u540c\u58eb\u306e\u8a08\u7b97<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#pandas%E3%81%AE%E5%BF%9C%E7%94%A8%E3%80%80%E6%9D%A1%E4%BB%B6%E4%BB%98%E3%81%8D%E6%A4%9C%E7%B4%A2%E3%80%81%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E6%AC%A0%E6%90%8D%E5%80%A4%E3%81%AE%E5%87%A6%E7%90%86\" title=\"pandas\u306e\u5fdc\u7528\u3000\u6761\u4ef6\u4ed8\u304d\u691c\u7d22\u3001\u30c7\u30fc\u30bf\u306e\u6b20\u640d\u5024\u306e\u51e6\u7406\">pandas\u306e\u5fdc\u7528\u3000\u6761\u4ef6\u4ed8\u304d\u691c\u7d22\u3001\u30c7\u30fc\u30bf\u306e\u6b20\u640d\u5024\u306e\u51e6\u7406<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#unipue%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%81%A7%E4%B8%80%E6%84%8F%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B\" title=\"unipue\u30e1\u30bd\u30c3\u30c9\u3067\u4e00\u610f\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\">unipue\u30e1\u30bd\u30c3\u30c9\u3067\u4e00\u610f\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E6%9D%A1%E4%BB%B6%E4%BB%98%E3%81%8D%E6%A4%9C%E7%B4%A2\" title=\"\u6761\u4ef6\u4ed8\u304d\u691c\u7d22\">\u6761\u4ef6\u4ed8\u304d\u691c\u7d22<\/a><ul class='ez-toc-list-level-4'><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E5%88%97%E3%81%94%E3%81%A8%E3%81%AB%E6%9D%A1%E4%BB%B6%E3%82%92%E3%81%A4%E3%81%91%E3%82%8B\" title=\"\u5217\u3054\u3068\u306b\u6761\u4ef6\u3092\u3064\u3051\u308b\">\u5217\u3054\u3068\u306b\u6761\u4ef6\u3092\u3064\u3051\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#loc%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E4%BD%BF%E3%81%86\" title=\"loc\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\">loc\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#query%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E4%BD%BF%E3%81%86\" title=\"query\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\">query\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E9%96%A2%E6%95%B0%E3%81%AE%E9%81%A9%E7%94%A8\" title=\"\u95a2\u6570\u306e\u9069\u7528\">\u95a2\u6570\u306e\u9069\u7528<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E7%B5%90%E5%90%88\" title=\"\u7d50\u5408\">\u7d50\u5408<\/a><ul class='ez-toc-list-level-4'><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E7%B8%A6%E7%B5%90%E5%90%88%E3%80%80append%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\" title=\"\u7e26\u7d50\u5408\u3000append\u30e1\u30bd\u30c3\u30c9\">\u7e26\u7d50\u5408\u3000append\u30e1\u30bd\u30c3\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E5%86%85%E9%83%A8%E7%B5%90%E5%90%88%E3%80%80merge%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\" title=\"\u5185\u90e8\u7d50\u5408\u3000merge\u30e1\u30bd\u30c3\u30c9\">\u5185\u90e8\u7d50\u5408\u3000merge\u30e1\u30bd\u30c3\u30c9<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E4%B8%A6%E3%81%B3%E6%9B%BF%E3%81%88%E3%80%80sort_values%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\" title=\"\u4e26\u3073\u66ff\u3048\u3000sort_values\u30e1\u30bd\u30c3\u30c9\">\u4e26\u3073\u66ff\u3048\u3000sort_values\u30e1\u30bd\u30c3\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E6%AC%A0%E6%90%8D%E5%80%A4%E3%81%8C%E3%81%82%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AE%E5%87%A6%E7%90%86%E3%80%80%E6%B6%88%E5%8E%BB%E5%80%A4%E3%82%92%E5%9F%8B%E3%82%81%E3%82%8B\" title=\"\u6b20\u640d\u5024\u304c\u3042\u308b\u5834\u5408\u306e\u51e6\u7406\u3000\u6d88\u53bb\/\u5024\u3092\u57cb\u3081\u308b\">\u6b20\u640d\u5024\u304c\u3042\u308b\u5834\u5408\u306e\u51e6\u7406\u3000\u6d88\u53bb\/\u5024\u3092\u57cb\u3081\u308b<\/a><ul class='ez-toc-list-level-4'><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E6%AC%A0%E6%90%8D%E5%80%A4%E3%81%AE%E7%A2%BA%E8%AA%8D\" title=\"\u6b20\u640d\u5024\u306e\u78ba\u8a8d\">\u6b20\u640d\u5024\u306e\u78ba\u8a8d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E6%AC%A0%E6%90%8D%E5%80%A4%E3%82%92%E5%89%8A%E9%99%A4%E3%80%80dropna%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\" title=\"\u6b20\u640d\u5024\u3092\u524a\u9664\u3000dropna\u30e1\u30bd\u30c3\u30c9\">\u6b20\u640d\u5024\u3092\u524a\u9664\u3000dropna\u30e1\u30bd\u30c3\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E6%AC%A0%E6%90%8D%E5%80%A4%E3%82%92%E5%9F%8B%E3%82%81%E3%82%8B%E3%80%80fillna%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\" title=\"\u6b20\u640d\u5024\u3092\u57cb\u3081\u308b\u3000fillna\u30e1\u30bd\u30c3\u30c9\">\u6b20\u640d\u5024\u3092\u57cb\u3081\u308b\u3000fillna\u30e1\u30bd\u30c3\u30c9<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E5%90%8C%E3%81%98%E5%80%A4%E3%82%92%E6%8C%81%E3%81%A4%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%9B%86%E7%B4%84%E3%81%99%E3%82%8B%E3%80%80groupby%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\" title=\"\u540c\u3058\u5024\u3092\u6301\u3064\u30c7\u30fc\u30bf\u3092\u96c6\u7d04\u3059\u308b\u3000groupby\u30e1\u30bd\u30c3\u30c9\">\u540c\u3058\u5024\u3092\u6301\u3064\u30c7\u30fc\u30bf\u3092\u96c6\u7d04\u3059\u308b\u3000groupby\u30e1\u30bd\u30c3\u30c9<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/#%E3%81%BE%E3%81%A8%E3%82%81\" title=\"\u307e\u3068\u3081\">\u307e\u3068\u3081<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"pandas%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6\"><\/span>pandas\u306b\u3064\u3044\u3066<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>pandas\u306f\u30c7\u30fc\u30bf\u89e3\u6790\u3084\u30c7\u30fc\u30bf\u64cd\u4f5c\u3001\u8a08\u7b97\u306a\u3069\u3092\u7c21\u5358\u306b\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<p>\u4e3b\u306b\u3001\u8868\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3044\u307e\u3059\u3002<\/p>\n<p><strong><a href=\"https:\/\/pandas.pydata.org\" target=\"_blank\" rel=\"noopener\">&gt;&gt; pandas\u516c\u5f0f<\/a><\/strong><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001pip\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\">pip install pandas<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF\"><\/span>\u8aad\u307f\u8fbc\u307f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8aad\u307f\u8fbc\u307f\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"\u8aad\u307f\u8fbc\u307f\">import pandas as pd<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"DataFrame%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6\"><\/span>DataFrame\u306b\u3064\u3044\u3066<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>pandas\u3067\u53d6\u308a\u6271\u3046\u3001\u30c7\u30fc\u30bf\u306fDataFrame\u3068\u3044\u3046\u578b\u3067\u53d6\u308a\u6271\u3044\u307e\u3059\u3002<\/p>\n<p>DataFrame\u306f\u6b21\u306e\u3088\u3046\u306a\u300cvalues\u300d\u300ccolumns\u300d\u300cindex\u300d\u3067\u69cb\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7159\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas1.png\" alt=\"\" width=\"469\" height=\"230\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas1.png 469w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas1-300x147.png 300w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"pandas%E3%81%AE%E5%9F%BA%E6%9C%AC%E3%80%80%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%97%E3%81%A6%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B\"><\/span>pandas\u306e\u57fa\u672c\u3000\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u3066\u8a08\u7b97\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u307e\u305a\u3001\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u6291\u3048\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>DataFrame\u3092\u4f5c\u3063\u3066\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u3001\u8a08\u7b97\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E4%BD%9C%E3%82%8B\"><\/span>\u30c7\u30fc\u30bf\u3092\u4f5c\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u7c21\u5358\u306aDataFrame\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"values%E3%81%AE%E3%81%BF%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B%E3%81%A8%E8%87%AA%E5%8B%95%E3%81%A7columns%E3%81%A8index%E3%81%8C%E3%81%A4%E3%81%8F\"><\/span>values\u306e\u307f\u3092\u6307\u5b9a\u3059\u308b\u3068\u81ea\u52d5\u3067columns\u3068index\u304c\u3064\u304f<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>list\u30672\u6b21\u5143\u30c7\u30fc\u30bf\u3092\u4f5c\u3063\u3066\u3001values\u306e\u307f\u3092\u4e0e\u3048\u305fDataFrame\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">DataFrame\u4f5c\u308a\u65b9<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df<span style=\"color: #800080;\"> =<\/span> pd.<span style=\"color: #000080;\">DataFrame<\/span>(list\u30c7\u30fc\u30bf)<\/strong><\/p>\n<\/div>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">list_a = [[1, 2, 3],\r\n          [4, 5, 6],\r\n          [7, 8, 9],]\r\ndf = pd.DataFrame(list_a)\r\nprint(df)<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"Out\">   0  1  2\r\n0  1  2  3\r\n1  4  5  6\r\n2  7  8  9<\/pre>\n<p>list\u3067values\u306e\u307f\u306e\u30c7\u30fc\u30bf\u3092\u4f5c\u3063\u305f\u306f\u305a\u304c\u3001columns\u3068index\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7151\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas3.png\" alt=\"\" width=\"172\" height=\"214\" \/><\/a><\/p>\n<p>\u306a\u3044\u5834\u5408\u306f\u3001\u52dd\u624b\u306b0, 1, 2,&#8230;\u3068\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"columns%E5%90%8Dindex%E5%90%8D%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B\"><\/span>columns\u540d,index\u540d\u3092\u6307\u5b9a\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>values\u3068\u4e00\u7dd2\u306b\u3001colums\u3001index\u3082\u3064\u3051\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">columns,index\u3092\u3064\u3051\u308b<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p>*\u884c\u540d\u3001\u5217\u540d\u306flist\u3001tuple\u306a\u3069\u306e\u914d\u5217\u3067\u4e0e\u3048\u308b<\/p>\n<\/div>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">list_a = [[1, 2, 3],\r\n          [4, 5, 6],\r\n          [7, 8, 9],]\r\ncol_name = ['col1', 'col2', 'col3']\r\nind_name = ['ind1', 'ind2', 'ind3']\r\ndf = pd.DataFrame(list_a, columns=col_name, index=ind_name)\r\nprint(df)<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"Out\">      col1  col2  col3\r\nind1     1     2     3\r\nind2     4     5     6\r\nind3     7     8     9<\/pre>\n<p>\u884c\u5217\u540d\u304c\u3064\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u5927\u62b5\u306f\u3001\u5217\u540d\u3060\u3051\u3092\u3064\u3051\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002\u305d\u306e\u5834\u5408\u3001index\u3092\u7701\u7565\u3059\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<p>\u30a8\u30af\u30bb\u30eb\u306b\u3057\u3066\u3082\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u3057\u3066\u3082\u5217\u540d\u306e\u307f\u304c\u591a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>index\u306f0,1,2,..\u306e\u9023\u756a\u3067\u5341\u5206\u3068\u3044\u3046\u306e\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"CSV%E3%81%AE%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF%E3%80%81%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E7%A2%BA%E8%AA%8D\"><\/span>CSV\u306e\u8aad\u307f\u8fbc\u307f\u3001\u30c7\u30fc\u30bf\u306e\u78ba\u8a8d<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>CSV\u306e\u8aad\u307f\u8fbc\u307f\u3084\u30c7\u30fc\u30bf\u306e\u78ba\u8a8d\u306f\u3001\u4e0b\u8a18\u306e\u4ee5\u524d\u306e\u8a18\u4e8b\u3092\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"tGyE5tdO7R\"><p><a href=\"https:\/\/www.tetsumag.com\/2021\/01\/11\/71\/\">\u3010pandas\u3011csv\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\/\u66f8\u304d\u8fbc\u3080\u3010Python\u3011<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3010pandas\u3011csv\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\/\u66f8\u304d\u8fbc\u3080\u3010Python\u3011&#8221; &#8212; \u3066\u3064\u307e\u3050\" src=\"https:\/\/www.tetsumag.com\/2021\/01\/11\/71\/embed\/#?secret=S7aJSuaFZu#?secret=tGyE5tdO7R\" data-secret=\"tGyE5tdO7R\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u4e0b\u8a18\u3001\u6dfb\u4ed8\u306e\u52a0\u5de5\u5e33\u660e\u7d30\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p><strong><a href=\"http:\/\/hituji1012.xsrv.jp\/wp-content\/uploads\/2020\/11\/948c8bd7b9eb3ca6277f87b0077a475c.csv\">&gt;&gt; \u52a0\u5de5\u5e33\u660e\u7d30<\/a><\/strong><\/p>\n<p>\u6b21\u306e\u30b3\u30fc\u30c9\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df = pd.read_csv('\u52a0\u5de5\u5e33\u660e\u7d30.csv', encoding='cp932', header=2)\r\ndf.head()<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas4-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7211\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas4-1.png\" alt=\"\" width=\"768\" height=\"202\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas4-1.png 768w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas4-1-600x158.png 600w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas4-1-300x79.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<p>\u8aad\u307f\u8fbc\u3093\u3060df\u306f\u3001\u3053\u306e\u8a18\u4e8b\u3067\u3053\u308c\u304b\u3089\u3067\u4f7f\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\"><\/span>\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u8aad\u307f\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001 DataFrame\u3092\u69cb\u6210\u3059\u308b\u3082\u306e\u3092\u53d6\u308a\u51fa\u3057\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"index_columns_values%E3%82%92%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\"><\/span>index, columns, values\u3092\u53d6\u308a\u51fa\u3059<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">print(df.index)\r\nprint(df.columns)\r\nprint(df.values)<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"Out\">RangeIndex(start=0, stop=7, step=1)\r\nIndex(['\u65e5\u4ed8', '\u65e5\u4ed81', '\u65e5\u4ed82', '\u65e5\u4ed83', '\u52a0\u5de5\u5e33\u884c\u756a\u53f7', '\u8eaf\u4f53\u30da\u30fc\u30b8\u756a\u53f7', '\u30de\u30fc\u30af', '\u540d\u79f01', '\u540d\u79f02',\r\n       '\u540d\u79f03', '\u5f62\u72b6\u756a\u53f7', '\u5f84', '\u6750\u8cea', '\u5207\u5bf8\u6cd5', '\u5207\u5bf8\u672c\u6570', '\u7b87\u6240\u6570', '\u5207\u5bf8\u5408\u8a08\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055', '\u5272\u6570',\r\n       '\u5b9a\u5c3a\u672c\u6570', '\u5727\u63a5\u7b87\u6240\u6570', '\u5b9a\u5c3a\u91cd\u91cf', '\u5207\u5bf8\u91cd\u91cf', '\u5b9a\u7740\u677f', '\u62c5\u5f53\u80051', '\u62c5\u5f53\u80052', '\u62c5\u5f53\u80053', '\u62c5\u5f53\u80054'],\r\n      dtype='object')\r\n[[nan nan nan nan 1 \"'(001)\" nan \"'F1\" \"'\u57fa\u790e\u914d\u7b4b\" \"'\u7e26\uff11\" nan 'D19' 'SD345'\r\n  4260 22 1 22 4500 1 22 nan 222.2 210.87 '\u7121' nan nan nan nan]\r\n [nan nan nan nan 2 \"'(001)\" nan \"'F1\" \"'\u57fa\u790e\u914d\u7b4b\" \"'\u6a2a\uff11\" nan 'D19' 'SD345'\r\n  4260 22 1 22 4500 1 22 nan 222.2 210.87 '\u7121' nan nan nan nan]\r\n [nan nan nan nan 3 \"'(001)\" nan \"'F1\" \"'\u306f\u304b\u307e\u7b4b\" \"'\u7e26\uff11\" nan 'D13' 'SD295A'\r\n  3230 8 1 8 6500 2 4 nan 25.88 25.71 '\u7121' nan nan nan nan]\r\n [nan nan nan nan 4 \"'(001)\" nan \"'F1\" \"'\u306f\u304b\u307e\u7b4b\" \"'\u7e26\uff11\" nan 'D13' 'SD295A'\r\n  5880 12 1 12 6000 1 12 nan 71.64 70.21 '\u7121' nan nan nan nan]\r\n [nan nan nan nan 5 \"'(001)\" nan \"'F1\" \"'\u306f\u304b\u307e\u7b4b\" \"'\u6a2a\uff11\" nan 'D13' 'SD295A'\r\n  3230 8 1 8 6500 2 4 nan 25.88 25.71 '\u7121' nan nan nan nan]\r\n [nan nan nan nan 6 \"'(001)\" nan \"'F1\" \"'\u306f\u304b\u307e\u7b4b\" \"'\u6a2a\uff11\" nan 'D13' 'SD295A'\r\n  5880 12 1 12 6000 1 12 nan 71.64 70.21 '\u7121' nan nan nan nan]\r\n [nan nan nan nan 7 \"'(001)\" nan \"'F1\" \"'\u8179\u7b4b\" \"'\u6a2a\uff11\" nan 'D13' 'SD295A'\r\n  4730 4 1 4 5000 1 4 nan 19.92 18.83 '\u7121' nan nan nan nan]]<\/pre>\n<p>\u4e0a\u304b\u3089\u3001index,columns,values\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5217\u540d\u3092\u78ba\u8a8d\u3059\u308b\u3068\u304d\u306b\u4f7f\u3046\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E5%88%97%E5%8D%98%E4%BD%8D%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\"><\/span>\u5217\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u3053\u306e\u5217\u3068\u3053\u306e\u5217\u304c\u6b32\u3057\u3044\u3068\u8a00\u3063\u305f\u3088\u3046\u306b\u5217\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059\u5834\u5408\u306f\u3001\u5217\u540d\u3092list\u3067\u6e21\u3057\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u5217\u5358\u4f4d\u3067\u53d6\u5f97<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df[\u5217\u540d\u306e\u914d\u5217]<\/strong><\/p>\n<\/div>\n<\/div>\n<p>\u3053\u306e\u3067\u306f\u3001\u5148\u307b\u3069\u78ba\u8a8d\u3057\u305f\u5217\u540d\u306e\u7d50\u679c\u3092\u898b\u308b\u3068\u3001\u6b21\u306e\u5217\u540d\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"\u5217\u540d\">['\u65e5\u4ed8', '\u65e5\u4ed81', '\u65e5\u4ed82', '\u65e5\u4ed83', '\u52a0\u5de5\u5e33\u884c\u756a\u53f7', '\u8eaf\u4f53\u30da\u30fc\u30b8\u756a\u53f7', '\u30de\u30fc\u30af', '\u540d\u79f01', '\u540d\u79f02',\r\n'\u540d\u79f03', '\u5f62\u72b6\u756a\u53f7', '\u5f84', '\u6750\u8cea', '\u5207\u5bf8\u6cd5', '\u5207\u5bf8\u672c\u6570', '\u7b87\u6240\u6570', '\u5207\u5bf8\u5408\u8a08\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055', '\u5272\u6570',\r\n'\u5b9a\u5c3a\u672c\u6570', '\u5727\u63a5\u7b87\u6240\u6570', '\u5b9a\u5c3a\u91cd\u91cf', '\u5207\u5bf8\u91cd\u91cf', '\u5b9a\u7740\u677f', '\u62c5\u5f53\u80051', '\u62c5\u5f53\u80052', '\u62c5\u5f53\u80053', '\u62c5\u5f53\u80054']<\/pre>\n<p>\u306a\u306e\u3067\u3001\u3053\u3053\u304b\u3089\u3001\u53d6\u5f97\u3057\u305f\u5217\u540d\u3092\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u300c\u5f84\u300d\u300c\u6750\u8cea\u300d\u3067\u3042\u308c\u3070\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df['\u5f84', '\u6750\u8cea']<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7154\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas5.png\" alt=\"\" width=\"260\" height=\"400\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas5.png 260w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas5-195x300.png 195w\" sizes=\"(max-width: 260px) 100vw, 260px\" \/><\/a><\/p>\n<p>\u4e0d\u8981\u306a\u5217\u3092\u524a\u3063\u3066\u3001\u5fc5\u8981\u306a\u5217\u306e\u307f\u306e\u30c7\u30fc\u30bf\u306b\u3059\u308b\u3068\u304d\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E8%A1%8C%E5%8D%98%E4%BD%8D%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\"><\/span>\u884c\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u884c\u5358\u4f4d\u3067\u53d6\u308a\u51fa\u3059\u5834\u5408\u306f\u3001\u53d6\u5f97\u3059\u308b\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u884c\u5358\u4f4d\u3067\u53d6\u5f97<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df[\u958b\u59cb\u884c\u6570:\u7d42\u4e86\u884c\u6570]<\/strong><br \/>\n\uff0a\u884c\u6570\u306f0\u304b\u3089\u59cb\u307e\u308a\u3001\u7d42\u4e86\u884c\u6570\u306e1\u3064\u524d\u307e\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n<\/div>\n<p>\u4f8b\u3048\u3070\u30012\u884c\u76ee\u76ee\u304b\u30894\u884c\u76ee\u76ee\u307e\u3067\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df[1:4]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7161\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas6.png\" alt=\"\" width=\"768\" height=\"130\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas6.png 768w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas6-600x102.png 600w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas6-300x51.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E5%BA%A7%E6%A8%99%E6%8C%87%E5%AE%9A%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99ilocloc\"><\/span>\u5ea7\u6a19\u6307\u5b9a\u3067\u53d6\u308a\u51fa\u3059iloc,loc<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u56f3\u306e\u3088\u3046\u306b\u3001\u90e8\u5206\u7684\u306b\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u305f\u3044\u5834\u5408\u306f\u3001iloc\u82e5\u3057\u304f\u306floc\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7162\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas7.png\" alt=\"\" width=\"300\" height=\"173\" \/><\/a><\/p>\n<p>iloc\u3067\u306f\u6570\u5024\u3067\u5ea7\u6a19\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">iloc<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df.iloc[\u958b\u59cb\u884c\u6570:\u7d42\u4e86\u884c\u6570,\u958b\u59cb\u5217\u6570:\u7d42\u4e86\u5217\u6570]<\/strong><br \/>\n\uff0a\u884c\u6570\u306f0\u304b\u3089\u59cb\u307e\u308a\u3001\u7d42\u4e86\u884c\u6570\u306e1\u3064\u524d\u307e\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n<\/div>\n<p>2\u884c\u76ee-4\u884c\u76ee\u30014\u5217\u76ee-6\u5217\u76ee\u307e\u3067\u53d6\u5f97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df.iloc[1:4, 3:6]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas8.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7164\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas8.png\" alt=\"\" width=\"300\" height=\"134\" \/><\/a><\/p>\n<p>\u958b\u59cb\u884c\u6570:\u7d42\u4e86\u884c\u6570,\u958b\u59cb\u5217\u6570:\u7d42\u4e86\u5217\u6570\u306f\u305d\u308c\u305e\u308c\u3001\u7701\u7565\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u7701\u7565\u6642\u306f\u3001\u958b\u59cb\u884c\u5217\u6570\u306e\u5834\u5408\u306f0\u304b\u3089\u3001\u7d42\u4e86\u884c\u5217\u6570\u306f\u6700\u7d42\u307e\u3067\u304c\u6307\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4e0b\u8a18\u8868\u306e\u3088\u3046\u306b\u8272\u3005\u306a\u4f7f\u3044\u65b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 49.34497816593886%; height: 108px;\">\n<tbody>\n<tr style=\"height: 18px;\">\n<td style=\"width: 50%; height: 18px;\">df.iloc[:,3:6]<\/td>\n<td style=\"width: 50%; height: 18px;\">\u5168\u884c\u30014\u5217\u76ee-6\u5217\u76ee<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"width: 50%; height: 18px;\">df.iloc[1:4, :]<\/td>\n<td style=\"width: 50%; height: 18px;\">2\u884c\u76ee-4\u884c\u76ee\u3001\u5168\u5217<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"width: 50%; height: 18px;\">df.iloc[2:, 3:6]<\/td>\n<td style=\"width: 50%; height: 18px;\">3\u884c\u76ee-\u6700\u7d42\u884c\u30014\u5217\u76ee-6\u5217\u76ee<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"width: 50%; height: 18px;\">df.iloc[1:4, :6]<\/td>\n<td style=\"width: 50%; height: 18px;\">2\u884c\u76ee-4\u884c\u76ee\u3001\u958b\u59cb\u5217-6\u5217\u76ee<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>loc\u3067\u306f\u3001\u884c\u540d\u3001\u5217\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">loc<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df.loc[\u884c\u540d\u914d\u5217, \u5217\u540d\u914d\u5217]<\/strong><\/p>\n<\/div>\n<\/div>\n<p>1,3\u884c\u76ee\u306e\u300c\u5f84\u300d\u300c\u6750\u8cea\u300d\u306e\u5217\u3092\u53d6\u5f97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df.loc[[0, 2], ['\u5f84', '\u6750\u8cea']]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas9.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7165\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas9.png\" alt=\"\" width=\"256\" height=\"152\" \/><\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E5%87%A6%E7%90%86%E3%81%A7%E5%8F%96%E3%82%8A%E5%87%BA%E3%81%99\"><\/span>\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3067\u53d6\u308a\u51fa\u3059<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u884c\u3084\u5217\u3092\u9806\u756a\u306b\u7e70\u308a\u8fd4\u3057\u3066\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u305f\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e3b\u306b\u3001\u884c\u3092\u9806\u756a\u306b\u7e70\u308a\u8fd4\u3059\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001<strong>\u884c\u3092\u7e70\u308a\u8fd4\u3057<\/strong>\u3066\u53d6\u5f97\u3059\u308b\u5834\u5408\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u884c\u3092\u7e70\u308a\u8fd4\u3059\u5834\u5408\u3001<strong>iterrows()<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u884c\u306e\u7e70\u308a\u8fd4\u3057<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>for ind, row in df.iterrows():<\/strong><\/p>\n<\/div>\n<\/div>\n<p>ind\u306b\u306f\u884c\u756a\u53f7\u3001row\u306b\u306f1\u884c\u5206\u306e\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u3066\u3001<strong>\u5217\u540d<\/strong>\u3092\u6307\u5b9a\u3059\u308b\u3068\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3067\u307f\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u884c\u3092\u7e70\u308a\u8fd4\u3059\r\nfor ind, row in df.iterrows():\r\n    print(ind, row[['\u5f84', '\u6750\u8cea']])<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas10.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7166\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas10.png\" alt=\"\" width=\"300\" height=\"233\" \/><\/a><\/p>\n<p>\u6b21\u306b\u3001<strong>\u5217\u3092\u7e70\u308a\u8fd4\u3057<\/strong>\u3066\u53d6\u5f97\u3059\u308b\u5834\u5408\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u5217\u3092\u7e70\u308a\u8fd4\u3059\u5834\u5408\u3001<strong>iteritems()<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u5217\u306e\u7e70\u308a\u8fd4\u3057<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>for col_name, col in df.iteritems():<\/strong><\/p>\n<\/div>\n<\/div>\n<p>col_name\u306b\u306f\u5217\u540d\u3001col\u306b\u306f1\u5217\u5206\u306e\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u3066\u3001<strong>\u884c\u6570<\/strong>\u3092\u6307\u5b9a\u3059\u308b\u3068\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3067\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4eca\u56de\u306fcol[[0, 1]]\u3068\u305b\u305a\u3001col[0]\u3001col[1]\u30681\u3064\u305a\u3064\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">for col_name, col in df.iteritems():\r\n    print(col_name, col[0], col[1])<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas11.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7167\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas11.png\" alt=\"\" width=\"434\" height=\"682\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas11.png 434w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas11-191x300.png 191w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/a><\/p>\n<p>\u4ee5\u4e0a\u304c\u3001\u30c7\u30fc\u30bf\u306e\u53d6\u308a\u51fa\u3057\u65b9\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u65b9\u6cd5\u3067\u8aad\u307f\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E8%A8%88%E7%AE%97\"><\/span>\u8a08\u7b97<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u6b21\u306f\u30c7\u30fc\u30bf\u306e\u8a08\u7b97\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u308f\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u3001\u5217\u3092[&#8216;\u5b9a\u5c3a\u672c\u6570&#8217;, &#8216;\u5b9a\u5c3a\u9577\u3055&#8217;]\u306b\u7d5e\u3063\u3066\u307f\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E7%B5%B1%E8%A8%88%E9%87%8F%E3%82%92%E7%A2%BA%E8%AA%8D\"><\/span>\u7d71\u8a08\u91cf\u3092\u78ba\u8a8d<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u5404\u5217\u306e\u7d71\u8a08\u91cf\u306f<strong>describe<\/strong>\u3092\u4f7f\u3046\u3053\u3068\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df2 = df[['\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]\r\ndf2.describe()<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas24.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7168\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas24.png\" alt=\"\" width=\"428\" height=\"484\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas24.png 428w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas24-265x300.png 265w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/a><\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u7d71\u8a08\u91cf\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u30011\u5217\u76ee\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">print('max:', df['\u5b9a\u5c3a\u672c\u6570'].max())\r\nprint('min:', df['\u5b9a\u5c3a\u672c\u6570'].min())\r\nprint('std:', df['\u5b9a\u5c3a\u672c\u6570'].std())\r\nprint('mean:', df['\u5b9a\u5c3a\u672c\u6570'].mean())\r\nprint('count:', df['\u5b9a\u5c3a\u672c\u6570'].count())<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"Out\">max: 22\r\nmin: 4\r\nstd: 8.059303999253345\r\nmean: 11.428571428571429\r\ncount: 7<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E5%88%97%E5%90%8C%E5%A3%AB%E3%81%AE%E8%A8%88%E7%AE%97\"><\/span>\u5217\u540c\u58eb\u306e\u8a08\u7b97<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u3053\u306e\u5217\u3068\u3053\u306e\u5217\u3092\u8a08\u7b97\u3057\u3066\u3001\u65b0\u3057\u3044\u5217\u3092\u8ffd\u52a0\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u6642\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5217\u540c\u58eb\u3092\u56db\u5247\u6f14\u7b97\u5b50\u3067\u8a08\u7b97\u3059\u308b\u3068\u5168\u90e8\u306e\u884c\u3092\u8a08\u7b97\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u5217\u540c\u58eb\u306e\u8a08\u7b97<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df.[\u65b0\u3057\u3044\u5217\u540d] = df.[\u5217\u540d1] * df.[\u5217\u540d2]<\/strong><\/p>\n<\/div>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df['\u5b9a\u5c3a\u672c\u6570_\u9577\u3055'] = df['\u5b9a\u5c3a\u672c\u6570'] * df['\u5b9a\u5c3a\u9577\u3055']\r\n\r\n# \u8a08\u7b97\u7d50\u679c\u3082\u8868\u793a\r\ndf[['\u5b9a\u5c3a\u672c\u6570_\u9577\u3055', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']].head()<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas25.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7169\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas25.png\" alt=\"\" width=\"300\" height=\"211\" \/><\/a><\/p>\n<p>\u5358\u7d14\u306b\u5024\u3092\u5165\u308c\u3066\u3082\u3001\u5217\u306e\u6570\u5206\u3060\u3051\u5024\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># 1\u3064\u306e\u6570\u5b57\u3092\u5165\u308c\u308b\r\ndf['\u5b9a\u5c3a\u672c\u6570_\u9577\u3055'] = 0\r\n\r\n# \u8a08\u7b97\u7d50\u679c\u3082\u8868\u793a\r\ndf[['\u5b9a\u5c3a\u672c\u6570_\u9577\u3055', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']].head()<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas26-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7190\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas26-1.png\" alt=\"\" width=\"400\" height=\"280\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas26-1.png 400w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas26-1-300x210.png 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>\u3053\u3053\u307e\u3067\u3092\u6291\u3048\u3066\u304a\u3051\u3070\u3001\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u8fbc\u307f\u3001\u53d6\u308a\u51fa\u3057\u3001\u8a08\u7b97\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u306b\u6b20\u640d\u304c\u591a\u304b\u3063\u305f\u308a\u3001\u3088\u308a\u8907\u96d1\u306a\u6761\u4ef6\u3067\u53d6\u308a\u51fa\u3057\u305f\u3044\u306a\u3069\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u5834\u5408\u306f\u3001\u6b21\u306e\u5fdc\u7528\u7de8\u306e\u77e5\u8b58\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"pandas%E3%81%AE%E5%BF%9C%E7%94%A8%E3%80%80%E6%9D%A1%E4%BB%B6%E4%BB%98%E3%81%8D%E6%A4%9C%E7%B4%A2%E3%80%81%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E6%AC%A0%E6%90%8D%E5%80%A4%E3%81%AE%E5%87%A6%E7%90%86\"><\/span>pandas\u306e\u5fdc\u7528\u3000\u6761\u4ef6\u4ed8\u304d\u691c\u7d22\u3001\u30c7\u30fc\u30bf\u306e\u6b20\u640d\u5024\u306e\u51e6\u7406<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3053\u3053\u304b\u3089\u306f\u3001\u6761\u4ef6\u3067\u306e\u691c\u7d22\u3084\u3001\u30c7\u30fc\u30bf\u306e\u6b20\u640d\u5024\u306e\u51e6\u7406\u306a\u3069\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u8272\u3005\u3042\u308b\u306e\u3067\u3001\u3056\u3063\u3068\u307f\u3066\u3001\u4f7f\u3044\u305f\u3044\u6642\u306b\u898b\u76f4\u3057\u3066\u3044\u305f\u3060\u304f\u3068\u826f\u3044\u3067\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"unipue%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%81%A7%E4%B8%80%E6%84%8F%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B\"><\/span>unipue\u30e1\u30bd\u30c3\u30c9\u3067\u4e00\u610f\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30c7\u30fc\u30bf\u306b\u306f\u9577\u3055\u3084\u91cd\u3055\u306e\u3088\u3046\u306a\u6570\u5024\u306e\u3082\u306e\u3068\u3001\u540d\u79f0\u3084\u8a18\u53f7\u306e\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u540d\u79f0\u3084\u8a18\u53f7\u306e\u30c7\u30fc\u30bf\u3092\u30ab\u30c6\u30b4\u30ea\u30ab\u30eb\u30c7\u30fc\u30bf\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u4f7f\u3063\u3066\u3044\u308b\u52a0\u5de5\u5e33\u660e\u7d30\u3067\u306f\u3001\u4f8b\u3048\u3070\u300c\u5f84\u300d\u306e\u5217\u3067\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df['\u5f84']\r\n<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas14.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7170\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas14.png\" alt=\"\" width=\"300\" height=\"235\" \/><\/a><\/p>\n<p>\u4eca\u306f\u30c7\u30fc\u30bf\u304c\u5c11\u306a\u3044\u306e\u3067\u3001\u300cD19\u300d\u300cD13\u300d\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u30c7\u30fc\u30bf\u304c\u591a\u3044\u5834\u5408\u3001\u5168\u90e8\u306e\u30c7\u30fc\u30bf\u3092\u898b\u3066\u78ba\u8a8d\u3059\u308b\u306e\u306f\u5927\u5909\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u6642\u306f\u3001<strong>unique<\/strong>\u3092\u4f7f\u3044\u3001\u91cd\u8907\u306e\u306a\u3044\uff08<strong>\u4e00\u610f<\/strong>\uff09\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">print(df['\u5f84'].unique())<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"Out\">['D19' 'D13']<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%E6%9D%A1%E4%BB%B6%E4%BB%98%E3%81%8D%E6%A4%9C%E7%B4%A2\"><\/span>\u6761\u4ef6\u4ed8\u304d\u691c\u7d22<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u306e\u306f\u57fa\u672c\u7de8\u3067\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u691c\u7d22\u3057\u3066\u52b9\u7387\u7684\u306b\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u691c\u7d22\u3067\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u306b\u306f\u3044\u304f\u3064\u304b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E5%88%97%E3%81%94%E3%81%A8%E3%81%AB%E6%9D%A1%E4%BB%B6%E3%82%92%E3%81%A4%E3%81%91%E3%82%8B\"><\/span>\u5217\u3054\u3068\u306b\u6761\u4ef6\u3092\u3064\u3051\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u5404\u5217\u3054\u3068\u306b\u6bd4\u8f03\u6f14\u7b97\u5b50\u3067\u6761\u4ef6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u4e00\u81f4\u3059\u308b\u6761\u4ef6\u306e\u30c7\u30fc\u30bf\u3060\u3051\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u5217\u540c\u58eb\u306e\u8a08\u7b97<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df2 = df[df[\u5217\u540d1] \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024]<br \/>\n<\/strong><\/p>\n<p>\u8907\u6570\u6761\u4ef6 and<br \/>\n<strong>df2 = df[(df[\u5217\u540d1] \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024) &amp; (df[\u5217\u540d2] \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024)]<\/strong><\/p>\n<p>\u8907\u6570\u6761\u4ef6 or<br \/>\n<strong>df2 = df[(df[\u5217\u540d1] \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024) | (df[\u5217\u540d2] \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024)]<\/strong><\/p>\n<\/div>\n<\/div>\n<p>\u300c\u5f84\u300d\u5217\u304cD13\u306e\u3082\u306e\u3092\u53d6\u5f97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u6761\u4ef6\u6307\u5b9a\u3057\u305f\u30c7\u30fc\u30bf\u306f<strong>df2<\/strong>\u306b\u65b0\u3057\u304f\u5165\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u5217\u306b\u6761\u4ef6\u3092\u3064\u3051\u308b\r\ndf2 = df[df['\u5f84']=='D13']\r\n\r\n# ['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']\u306e\u307f\u8868\u793a\r\ndf2[['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]<\/pre>\n<p>3\u5217\u3060\u3051\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001D13\u306e\u307f\u306e\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas15.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7171\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas15.png\" alt=\"\" width=\"300\" height=\"269\" \/><\/a><\/p>\n<p>\u3053\u308c\u306f\u3001\u5206\u89e3\u3057\u3066\u307f\u308b\u3068\u308f\u304b\u308a\u3084\u3059\u3044\u306e\u3067\u3059\u304c\u3001\u6761\u4ef6\u5f0f\u304b\u3089\u306f\u4e00\u81f4\u3057\u305f\u884c\u304cTrue\/False\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df['\u5f84']=='D13'<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"Out\">0    False\r\n1    False\r\n2     True\r\n3     True\r\n4     True\r\n5     True\r\n6     True<\/pre>\n<p>\u3053\u306eTrue\u306e\u7b87\u6240\u306e\u884c\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"loc%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E4%BD%BF%E3%81%86\"><\/span>loc\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>loc\u3067\u3082\u540c\u69d8\u306b\u6761\u4ef6\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>loc\u3092\u3064\u3051\u3066\u3001\u691c\u7d22\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u3001\u300c\u5b9a\u6570\u672c\u6570\u300d\u306e\u6761\u4ef6\u3082\u5897\u3084\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># loc\u3092\u4f7f\u3046\r\ndf2 = df.loc[(df['\u5f84']=='D13') &amp;amp; (df['\u5b9a\u5c3a\u672c\u6570']==12)]\r\n\r\n# ['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']\u306e\u307f\u8868\u793a\r\ndf2[['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas16.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7172\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas16.png\" alt=\"\" width=\"300\" height=\"136\" \/><\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"query%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E4%BD%BF%E3%81%86\"><\/span>query\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>query\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u691c\u7d22\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>query\u306f\u6b21\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u3092\u3057\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">query\u306e\u691c\u7d22<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df2 = df.quey[\u6761\u4ef6\u5f0f]<\/strong><\/p>\n<\/div>\n<\/div>\n<p>\u6761\u4ef6\u5f0f\u306f\u6b21\u306e\u3088\u3046\u306b\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 96.39737991266375%; height: 245px;\">\n<tbody>\n<tr>\n<td style=\"width: 41.58087335247746%;\">\u6761\u4ef6\u5f0f<\/td>\n<td style=\"width: 25.3569387459388%;\">\u4f8b<\/td>\n<td style=\"width: 33.06218790158374%;\">\u610f\u5473<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.58087335247746%;\"><strong>\u5217\u540d<\/strong> \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024<\/td>\n<td style=\"width: 25.3569387459388%;\">\u5f84 == &#8216;D13&#8217;<br \/>\n\u5b9a\u5c3a\u9577\u3055 &gt; 5<\/td>\n<td style=\"width: 33.06218790158374%;\">\u5f84\u304cD13\u306e\u3082\u306e<br \/>\n\u5b9a\u5c3a\u9577\u3055\u304c5\u3088\u308a\u5927\u304d\u3044<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.58087335247746%;\"><strong>not \u5217\u540d<\/strong> \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024<strong><br \/>\n<\/strong><\/td>\n<td style=\"width: 25.3569387459388%;\">not \u5f84 == &#8216;D13&#8217;<\/td>\n<td style=\"width: 33.06218790158374%;\">\u5f84\u304cD13\u306e\u4ee5\u5916\u306e\u3082\u306e<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.58087335247746%;\">\u5024 \u6bd4\u8f03\u6f14\u7b97\u5b50 <strong>\u5217\u540d<\/strong> \u6bd4\u8f03\u6f14\u7b97\u5b50 \u5024<\/td>\n<td style=\"width: 25.3569387459388%;\">5 &lt; \u5b9a\u5c3a\u9577\u3055 &lt;20<\/td>\n<td style=\"width: 33.06218790158374%;\">\u5b9a\u5c3a\u9577\u3055\u304c5\u3088\u308a\u5927\u304d\u304f\u300120\u672a\u6e80<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.58087335247746%;\"><strong>\u5217\u540d<\/strong> in [&#8216;\u5024&#8217;, &#8216;\u5024&#8217;]<\/td>\n<td style=\"width: 25.3569387459388%;\">\u5f84 in [&#8216;D13&#8217;, &#8216;D19&#8217;]<\/td>\n<td style=\"width: 33.06218790158374%;\">\u5f84\u304cD13\u3001D19\u306e\u3082\u306e<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.58087335247746%;\"><strong>\u5217\u540d not<\/strong>\u00a0in [&#8216;\u5024&#8217;, &#8216;\u5024&#8217;]<\/td>\n<td style=\"width: 25.3569387459388%;\">\u5f84 not in [&#8216;D13&#8217;, &#8216;D19&#8217;]<\/td>\n<td style=\"width: 33.06218790158374%;\">\u5f84\u304cD13\u3001D19\u4ee5\u5916\u306e\u3082\u306e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2\u3064\u5b9f\u969b\u306b\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df2 = df.query('\u5b9a\u5c3a\u672c\u6570==4')\r\n\r\ndf2[['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas17.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7173\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas17.png\" alt=\"\" width=\"300\" height=\"183\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df2 = df.query('\u5f84 in [\"D13\"]')\r\n\r\ndf2[['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas18.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7174\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas18.png\" alt=\"\" width=\"300\" height=\"278\" \/><\/a><\/p>\n<p>query\u306b\u306f\u6587\u5b57\u5217\u3067\u6761\u4ef6\u3092\u6e21\u3059\u306e\u3067\u3001\u30b7\u30f3\u30b0\u30eb\u30b3\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u3063\u305f\u3089\u3001\u4e2d\u306e\u691c\u7d22\u6587\u5b57\u306f\u30c0\u30d6\u30eb\u30b3\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u9006\u3067\u3082\u826f\u3044\u3067\u3059\u3002<\/p>\n<p>\u4ed6\u306b\u3082\u8272\u3005\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E9%96%A2%E6%95%B0%E3%81%AE%E9%81%A9%E7%94%A8\"><\/span>\u95a2\u6570\u306e\u9069\u7528<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3042\u308b\u5217\u3092\u95a2\u6570\u3092\u4f7f\u3063\u305f\u51e6\u7406\u3092\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u300c\u5f84\u300d\u5217\u3092\u6b21\u306e\u8868\u306e\u3088\u3046\u306b\u300c\u5358\u4f4d\u8cea\u91cf\u300d\u306b\u5909\u63db\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas20.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7175\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas20.png\" alt=\"\" width=\"768\" height=\"133\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas20.png 768w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas20-600x104.png 600w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas20-300x52.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<p><strong><a href=\"https:\/\/www.mnt-kankyo.com\/tekkinn.htm\" target=\"_blank\" rel=\"noopener\">&gt;&gt; \u53c2\u7167\u30ea\u30f3\u30af<\/a><\/strong><\/p>\n<p>\u305d\u306e\u6642\u306f\u3001map\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c\u5f84\u300d\u3092\u8868\u304b\u3089\u6570\u5024\u306b\u3057\u305f\u300c\u5358\u4f4d\u8cea\u91cf\u300d\u5217\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u95a2\u6570\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">def func_kei(x):\r\n    ret = 0\r\n    if x=='D13':\r\n        ret = 0.995\r\n    if x=='D19':\r\n        ret = 2.250\r\n    return ret<\/pre>\n<p>\u5f15\u6570\u306ex\u306b\u306f\u3001\u5217\u306e\u5024\u304c\u5165\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u3042\u3068\u306f\u3001map(\u95a2\u6570)\u3068\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df['\u5358\u4f4d\u8cea\u91cf'] = df['\u5f84'].map(func_kei)\r\ndf[['\u5f84', '\u5358\u4f4d\u8cea\u91cf']]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas21.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7176\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas21.png\" alt=\"\" width=\"166\" height=\"300\" \/><\/a><\/p>\n<p>\u8868\u306e\u901a\u308a\u306b\u5909\u63db\u3067\u304d\u3066\u307e\u3059\u306d\u3002<\/p>\n<p>\u5358\u4f4d\u8cea\u91cf\u304c\u308f\u304b\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u9244\u7b4b\u7dcf\u91cd\u91cf\u304c\u8a08\u7b97\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u9244\u7b4b\u7dcf\u91cd\u91cf\u306e\u8a08\u7b97\r\ndf['\u9244\u7b4b\u7dcf\u91cd\u91cf[t]'] = df['\u5358\u4f4d\u8cea\u91cf'] * df['\u5b9a\u5c3a\u9577\u3055'] * df['\u5b9a\u5c3a\u672c\u6570'] \/ 1e6\r\ndf[['\u9244\u7b4b\u7dcf\u91cd\u91cf[t]', '\u5358\u4f4d\u8cea\u91cf', '\u5b9a\u5c3a\u9577\u3055', '\u5b9a\u5c3a\u672c\u6570']]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas22.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7177\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas22.png\" alt=\"\" width=\"300\" height=\"230\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E7%B5%90%E5%90%88\"><\/span>\u7d50\u5408<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30c7\u30fc\u30bf\u306f\u8907\u6570\u306e\u30ea\u30bd\u30fc\u30b9\u304b\u3089\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u5206\u304b\u308c\u3066\u3044\u308b\u5834\u5408\u3067\u3059\u306d\u3002<\/p>\n<p>\u7d50\u5408\u306f\u6a2a\u65b9\u5411\u3068\u7e26\u65b9\u5411\u306e\u7d50\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u7d50\u5408\u3067\u306f\u3001\u7d50\u5408\u3068\u306a\u308b\u30ad\u30fc\u5217\u3092\u4f7f\u3063\u3066\u3001\u540c\u3058\u5024\u306e\u3082\u306e\u3092\u7d50\u5408\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u6a2a\u7d50\u5408\u306f\u3044\u304f\u3064\u304b\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 28.675400291120823%;\" colspan=\"2\">\u7d50\u5408\u7a2e\u985e<\/td>\n<td style=\"width: 53.238719068413396%;\">\u30a4\u30e1\u30fc\u30b8<\/td>\n<td style=\"width: 18.085880640465795%;\">\u30e1\u30bd\u30c3\u30c9<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.675400291120823%;\" colspan=\"2\">\u7e26\u7d50\u5408<\/td>\n<td style=\"width: 53.238719068413396%;\"><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas26.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7184\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas26.png\" alt=\"\" width=\"300\" height=\"176\" \/><\/a><\/td>\n<td style=\"width: 18.085880640465795%;\">append<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 11.826783114992725%;\" rowspan=\"4\">\u6a2a\u7d50\u5408<\/td>\n<td style=\"width: 16.848617176128098%;\">\u5185\u90e8<\/td>\n<td style=\"width: 53.238719068413396%;\"><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas27.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7185\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas27.png\" alt=\"\" width=\"300\" height=\"136\" \/><\/a><\/td>\n<td style=\"width: 18.085880640465795%;\">merge<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.848617176128098%;\">\u5de6\u5916\u90e8<\/td>\n<td style=\"width: 53.238719068413396%;\"><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas28.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7186\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas28.png\" alt=\"\" width=\"300\" height=\"149\" \/><\/a><\/td>\n<td style=\"width: 18.085880640465795%;\">merge(how=&#8221;left&#8221;)<br \/>\n*how\u306f\u5f15\u6570<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.848617176128098%;\">\u53f3\u5916\u90e8<\/td>\n<td style=\"width: 53.238719068413396%;\"><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas29.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7179\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas29.png\" alt=\"\" width=\"300\" height=\"150\" \/><\/a><\/td>\n<td style=\"width: 18.085880640465795%;\">merge(how=&#8221;right&#8221;)<br \/>\n*how\u306f\u5f15\u6570<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 16.848617176128098%;\">\u5916\u90e8<\/td>\n<td style=\"width: 53.238719068413396%;\"><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas30.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7180\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas30.png\" alt=\"\" width=\"300\" height=\"156\" \/><\/a><\/td>\n<td style=\"width: 18.085880640465795%;\">merge(how=&#8221;outer&#8221;)<br \/>\n*how\u306f\u5f15\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Nan\u3068\u306a\u3063\u3066\u3044\u308b\u90e8\u5206\u306f\u3001\u30c7\u30fc\u30bf\u304c\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p>\u7d50\u5408\u3059\u308b\u6761\u4ef6\u304c\u4e00\u81f4\u3057\u306a\u3044\u5834\u5408\u306f\u3001\u30c7\u30fc\u30bf\u304c\u306a\u3044\u306e\u3067Nan\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E7%B8%A6%E7%B5%90%E5%90%88%E3%80%80append%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\"><\/span>\u7e26\u7d50\u5408\u3000append\u30e1\u30bd\u30c3\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u7e26\u7d50\u5408\u306b\u306f<strong>append<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u5f84\u3092D13\u3068D19\u3067\u5206\u3051\u305f\u3082\u306e\u3092\u3001\u7d50\u5408\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>df1\u3068df2\u306b\u5206\u3051\u3066\u3001\u4e8c\u3064\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304d\u305f\u3068\u4eee\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u30c7\u30fc\u30bf\u30922\u3064\u4f5c\u308b\r\ndf1 = df[df['\u5f84']=='D13'][['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]\r\ndf2 = df[df['\u5f84']=='D19'][['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]<\/pre>\n<div class=\"clearfix responbox50\">\n<div class=\"lbox\">\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas31.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7181\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas31.png\" alt=\"\" width=\"300\" height=\"281\" \/><\/a><\/p>\n<\/div>\n<div class=\"rbox\">\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas32.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7182\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas32.png\" alt=\"\" width=\"300\" height=\"144\" \/><\/a><\/p>\n<\/div>\n<\/div>\n<p>\u3053\u306e2\u3064\u3092\u7d50\u5408\u3057\u3066df3\u306b\u5165\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u7d50\u5408\r\ndf3 = df1.append(df2)\r\ndf3<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas33.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7183\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas33.png\" alt=\"\" width=\"356\" height=\"430\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas33.png 356w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas33-248x300.png 248w\" sizes=\"(max-width: 356px) 100vw, 356px\" \/><\/a><\/p>\n<p>\u7d50\u5408\u3067\u304d\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E5%86%85%E9%83%A8%E7%B5%90%E5%90%88%E3%80%80merge%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\"><\/span>\u5185\u90e8\u7d50\u5408\u3000merge\u30e1\u30bd\u30c3\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u6a2a\u7d50\u5408\u306b\u306f<strong>merge<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u540c\u3058\u304f\u3001\u30c7\u30fc\u30bf\u30922\u3064\u306b\u5206\u3051\u307e\u3059\u3002<\/p>\n<p>\u4e8c\u3064\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304d\u305f\u3068\u4eee\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u30c7\u30fc\u30bf\u30922\u3064\u4f5c\u308b\r\ndf1 = df.iloc[:4][['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]\r\ndf2 = pd.DataFrame(data=[['D19', 2.25], ['D22', 3.04]], columns=['\u5f84', '\u5358\u4f4d\u8cea\u91cf'])<\/pre>\n<div class=\"clearfix responbox50\">\n<div class=\"lbox\">\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas34.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7198\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas34.png\" alt=\"\" width=\"350\" height=\"268\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas34.png 350w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas34-300x230.png 300w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><\/a><\/p>\n<\/div>\n<div class=\"rbox\">\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas35.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7199\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas35.png\" alt=\"\" width=\"242\" height=\"154\" \/><\/a><\/p>\n<\/div>\n<\/div>\n<p>\u9806\u756a\u306b\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u5185\u90e8\u7d50\u5408<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u5185\u90e8\u7d50\u5408\r\ndf3 = df1.merge(df2)\r\ndf3<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas36.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7200\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas36.png\" alt=\"\" width=\"400\" height=\"136\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas36.png 400w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas36-300x102.png 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p><strong>\u5de6\u5916\u90e8\u7d50\u5408<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u5de6\u5916\u90e8\u7d50\u5408\r\ndf3 = df1.merge(df2, how=\"left\")\r\ndf3<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas37.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7201\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas37.png\" alt=\"\" width=\"400\" height=\"236\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas37.png 400w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas37-300x177.png 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p><strong>\u53f3\u5916\u90e8\u7d50\u5408<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u53f3\u5916\u90e8\u7d50\u5408\r\ndf3 = df1.merge(df2, how=\"right\")\r\ndf3<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas38.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7202\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas38.png\" alt=\"\" width=\"400\" height=\"172\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas38.png 400w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas38-300x129.png 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p><strong>\u5b8c\u5168\u5916\u90e8\u7d50\u5408<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u5b8c\u5168\u7d50\u5408\r\ndf3 = df1.merge(df2, how=\"outer\")\r\ndf3<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas39.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7192\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas39.png\" alt=\"\" width=\"400\" height=\"275\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas39.png 400w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas39-300x206.png 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%A6%E3%81%B3%E6%9B%BF%E3%81%88%E3%80%80sort_values%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\"><\/span>\u4e26\u3073\u66ff\u3048\u3000sort_values\u30e1\u30bd\u30c3\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30c7\u30fc\u30bf\u3092\u4e26\u3079\u66ff\u3048\u308b\u5834\u5408\u306b\u306f\u3001<strong>sort_values<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u4e26\u3079\u66ff\u3048<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df2 = df.sort_values(\u5217\u540d, ascending=True \/False)<br \/>\n*ascending\u306f\u7701\u7565\u6642\u306fTrue\u3067True\u306f\u6607\u9806\u3001False\u306f\u964d\u9806<\/strong><\/p>\n<\/div>\n<\/div>\n<p>\u300c\u95a2\u6570\u306e\u9069\u7528\u300d\u306e\u30d1\u30fc\u30c8\u3067\u8a08\u7b97\u3057\u305f<strong>\u9244\u7b4b\u7dcf\u91cd\u91cf[t]<\/strong>\u3092\u4e26\u3079\u66ff\u3048\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df2 = df.sort_values('\u9244\u7b4b\u7dcf\u91cd\u91cf[t]')\r\ndf2[['\u9244\u7b4b\u7dcf\u91cd\u91cf[t]', '\u5358\u4f4d\u8cea\u91cf', '\u5b9a\u5c3a\u9577\u3055', '\u5b9a\u5c3a\u672c\u6570']]<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas40.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7193\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas40.png\" alt=\"\" width=\"400\" height=\"301\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas40.png 400w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas40-300x226.png 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E6%AC%A0%E6%90%8D%E5%80%A4%E3%81%8C%E3%81%82%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AE%E5%87%A6%E7%90%86%E3%80%80%E6%B6%88%E5%8E%BB%E5%80%A4%E3%82%92%E5%9F%8B%E3%82%81%E3%82%8B\"><\/span>\u6b20\u640d\u5024\u304c\u3042\u308b\u5834\u5408\u306e\u51e6\u7406\u3000\u6d88\u53bb\/\u5024\u3092\u57cb\u3081\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30c7\u30fc\u30bf\u306f\u304d\u308c\u3044\u306b\u57cb\u307e\u3063\u3066\u306a\u304f\u3001\u30c7\u30fc\u30bf\u304c\u306a\u3044\u72b6\u614b\uff08<strong>\u6b20\u640d\u5024<\/strong>\uff09\u304c\u3042\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E6%AC%A0%E6%90%8D%E5%80%A4%E3%81%AE%E7%A2%BA%E8%AA%8D\"><\/span>\u6b20\u640d\u5024\u306e\u78ba\u8a8d<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u6b20\u640d\u5024\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u306f\u3001<strong>isnull<\/strong>\u3092\u4f7f\u3046\u3053\u3068\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df.isnull()<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/python11_panda41-768x188-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7221\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/python11_panda41-768x188-1.png\" alt=\"\" width=\"768\" height=\"188\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda41-768x188-1.png 768w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda41-768x188-1-600x147.png 600w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda41-768x188-1-300x73.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<p>\u3053\u306e\u3088\u3046\u306bTrue\/False\u3067\u5224\u5b9a\u3055\u308c\u307e\u3059\u3002True\u304c\u6b20\u640d\u5024\u3067\u3059\u3002<\/p>\n<p>True=1\u3001False=0\u3068\u6271\u308f\u308c\u308b\u306e\u3067\u3001\u3053\u308c\u3092sum\u3092\u4f7f\u3063\u3066\u5408\u8a08\u3059\u308b\u3068\u3001\u5404\u5217\u306e\u6b20\u640d\u5024\u306e\u6570\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\">df.isnull().sum()<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" title=\"Out\">\u65e5\u4ed8          7\r\n\u65e5\u4ed81         7\r\n\u65e5\u4ed82         7\r\n\u65e5\u4ed83         7\r\n\u52a0\u5de5\u5e33\u884c\u756a\u53f7      0\r\n\u8eaf\u4f53\u30da\u30fc\u30b8\u756a\u53f7     0\r\n\u30de\u30fc\u30af         7\r\n\u540d\u79f01         0\r\n\u540d\u79f02         0\r\n\u540d\u79f03         0\r\n\u5f62\u72b6\u756a\u53f7        7\r\n\u5f84           0\r\n....<\/pre>\n<p>\u3053\u306e\u6b20\u640d\u5024\u3092\u3069\u3046\u3059\u308b\u304b\u306f\u3001\u524a\u9664\u3059\u308b\u304b\u3001\u9055\u3046\u5024\u3067\u57cb\u3081\u308b\u304b\u3067\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E6%AC%A0%E6%90%8D%E5%80%A4%E3%82%92%E5%89%8A%E9%99%A4%E3%80%80dropna%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\"><\/span>\u6b20\u640d\u5024\u3092\u524a\u9664\u3000dropna\u30e1\u30bd\u30c3\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u524a\u9664\u306b\u306f<strong>dropna<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u6b20\u640d\u5024\u524a\u9664<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p><strong>df2 = df.dropna(how=&#8221;all&#8221;\/&#8221;any&#8221;, axis=0\/1)<br \/>\n<\/strong>*how\u306f\u7701\u7565\u6642\u306fany\u3067\u3001any\u306f1\u3064\u3067\u3082\u6b20\u640d\u5024\u304c\u3042\u308c\u3070\u524a\u9664\u3001all\u306f\u5168\u3066\u304c\u6b20\u640d\u5024\u306a\u3089\u524a\u9664<br \/>\n*axis\u306f\u7701\u7565\u6642\u306f0\u3067\u30010\u306f\u884c\u65b9\u5411\u306b\u524a\u9664\u30011\u306f\u5217\u65b9\u5411\u306b\u524a\u9664<\/p>\n<\/div>\n<\/div>\n<p>dropna\u3092\u5f15\u6570\u306a\u3057\u3067\u3001\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>how=&#8221;any&#8221;, axis=0\u306e\u72b6\u614b\u3067\u3059\u3002\u6b20\u640d\u5024\u304c\u3042\u308b\u3001\u884c\u3092\u524a\u9664\u3057\u307e\u3059\u3002\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u6b20\u640d\u5024\u524a\u9664\r\ndf2 = df.dropna()\r\ndf2<\/pre>\n<p>\u5168\u3066\u306e\u30c7\u30fc\u30bf\u304c\u6d88\u3048\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b axis=1\u306b\u3057\u3066\u3001\u6b20\u640d\u5024\u304c\u3042\u308b\u5217\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u6b20\u640d\u5024\u524a\u9664\r\ndf2 = df.dropna(axis=1)\r\ndf2<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/python11_panda42-768x211-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7217\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/python11_panda42-768x211-1.png\" alt=\"\" width=\"768\" height=\"211\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda42-768x211-1.png 768w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda42-768x211-1-600x165.png 600w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda42-768x211-1-300x82.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<p>\u30c7\u30fc\u30bf\u306e\u306a\u3044\u5217\u3092\u6d88\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E6%AC%A0%E6%90%8D%E5%80%A4%E3%82%92%E5%9F%8B%E3%82%81%E3%82%8B%E3%80%80fillna%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\"><\/span>\u6b20\u640d\u5024\u3092\u57cb\u3081\u308b\u3000fillna\u30e1\u30bd\u30c3\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u6b20\u640d\u5024\u3092\u57cb\u3081\u308b\u5834\u5408\u306f\u3001<strong>fillna<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>0\u3067\u57cb\u3081\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u6b20\u640d\u5024\u3092\u57cb\u3081\u308b\r\ndf2 = df.fillna(0)\r\ndf2<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/python11_panda43-768x172-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7223\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/python11_panda43-768x172-1.png\" alt=\"\" width=\"768\" height=\"172\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda43-768x172-1.png 768w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda43-768x172-1-600x134.png 600w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/python11_panda43-768x172-1-300x67.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<p>0\u3067\u57cb\u307e\u308a\u307e\u3057\u304c\u3001\u3053\u308c\u81ea\u4f53\u306f\u4f55\u3082\u610f\u5473\u3092\u306a\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u306f\u3001\u8cb4\u91cd\u306a\u30c7\u30fc\u30bf\u3092\u306a\u308b\u3079\u304f\u6e1b\u3089\u3055\u305a\u6a5f\u68b0\u5b66\u7fd2\u3067\u4f7f\u3044\u305f\u3044\u3068\u3044\u3046\u3068\u304d\u306b\u3001\u4ed6\u306e\u30c7\u30fc\u30bf\u304b\u3089\u5224\u65ad\u3057\u3066\u3001\u5e73\u5747\u5024\u306a\u3069\u3067\u57cb\u3081\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%90%8C%E3%81%98%E5%80%A4%E3%82%92%E6%8C%81%E3%81%A4%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%9B%86%E7%B4%84%E3%81%99%E3%82%8B%E3%80%80groupby%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89\"><\/span>\u540c\u3058\u5024\u3092\u6301\u3064\u30c7\u30fc\u30bf\u3092\u96c6\u7d04\u3059\u308b\u3000groupby\u30e1\u30bd\u30c3\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u540c\u3058\u5024\u3092\u6301\u3064\u30c7\u30fc\u30bf\u3092\u307e\u3068\u3081\u3066\u3001\u5e73\u5747\u3001\u6700\u5927\u5024\u306a\u3069\u3092\u8a08\u7b97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u96c6\u7d04\u306b\u306fgroupby\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<div>\n<div style=\"height: 15px;\"><span style=\"background: #91D8AC; padding: 10px 10px; border-radius: 10px; color: #ffffff; font-weight: bold; margin-left: 10px;\">\u96c6\u7d04<\/span><\/div>\n<div style=\"padding: 30px 15px 10px; border-radius: 5px; border: 8px solid #91D8AC;\">\n<p>\u5408\u8a08<strong><br \/>\ndf2 = df.groupby(&#8216;\u5217\u540d&#8217;).sum()<\/strong><\/p>\n<p>\u5e73\u5747<strong><br \/>\ndf2 = df.groupby(&#8216;\u5217\u540d&#8217;).mean()<\/strong><\/p>\n<p>\u6a19\u6e96\u504f\u5dee<strong><br \/>\ndf2 = df.groupby(&#8216;\u5217\u540d&#8217;).std()<\/strong><\/p>\n<p>\u4e2d\u592e\u5024<strong><br \/>\ndf2 = df.groupby(&#8216;\u5217\u540d&#8217;).median()<\/strong><\/p>\n<\/div>\n<\/div>\n<p>[&#8216;\u5f84&#8217;, &#8216;\u5b9a\u5c3a\u672c\u6570&#8217;, &#8216;\u5b9a\u5c3a\u9577\u3055&#8217;]\u3092\u4f7f\u3063\u3066\u3001\u300c\u5f84\u300d\u3067\u96c6\u7d04\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" title=\"In\"># \u96c6\u7d04\r\ndf1 = df[['\u5f84', '\u5b9a\u5c3a\u672c\u6570', '\u5b9a\u5c3a\u9577\u3055']]\r\ndf2 = df1.groupby('\u5f84').mean()\r\ndf2<\/pre>\n<p><a href=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas44.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-7197\" src=\"https:\/\/tetsumag.com\/wp-content\/uploads\/2020\/11\/pandas44.png\" alt=\"\" width=\"324\" height=\"216\" srcset=\"https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas44.png 324w, https:\/\/tetsumag.com\/blog\/wp-content\/uploads\/2020\/11\/pandas44-300x200.png 300w\" sizes=\"(max-width: 324px) 100vw, 324px\" \/><\/a><\/p>\n<p>\u3053\u306e\u8a08\u7b97\u81ea\u4f53\u306f\u3042\u307e\u308a\u610f\u5473\u304c\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u6027\u5225\u306b\u3088\u308b\u30c7\u30fc\u30bf\u306e\u5e73\u5747\u5024\u306a\u3069\u8a08\u7b97\u3059\u308b\u3068\u304d\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<h2><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<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u3066\u8a08\u7b97\u3059\u308bpandas\u306e\u57fa\u672c\u64cd\u4f5c\u3068\u3001\u6761\u4ef6\u4ed8\u304d\u3067\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3059\u308b\u65b9\u6cd5\u3084\u30c7\u30fc\u30bf\u306e\u6b20\u640d\u5024\u3092\u51e6\u7406\u3059\u308b\u65b9\u6cd5\u7b49\u306epandas\u306e\u5fdc\u7528\u7684\u306a\u64cd\u4f5c\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u591a\u304f\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u767b\u5834\u3057\u3001\u521d\u5b66\u8005\u306b\u306f\u5c11\u3057\u96e3\u3057\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u5c11\u3057\u305a\u3064\u7fd2\u5f97\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>python\u3067\u306f\u30c7\u30fc\u30bf\u89e3\u6790\u3092\u3088\u304f\u884c\u3044\u307e\u3059\u3002 \u305d\u3093\u306a\u4e2d\u3088\u304f\u4f7f\u3046\u30c7\u30fc\u30bf\u3068\u3044\u3048\u3070\u3001\u8868\u30c7\u30fc\u30bf\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff1f \u8868\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u3067\u3059\u3002 \u30a8\u30af\u30bb\u30eb\u306e\u30c7\u30fc\u30bf\u3060\u3063\u305f\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30fc\u30bf\u306e\u3053\u3068\u3067\u3059\u3002 \u5217\u540d \u5217\u540d \u5217\u540d \u3053 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/tetsumag.com\/blog\/2020\/11\/07\/125\/\"> <span class=\"screen-reader-text\">\u3010pandas\u3011pandas\u306e\u57fa\u672c\u77e5\u8b58\u3000\u57fa\u790e\u304b\u3089\u5fdc\u7528\u307e\u3067\u3010Python\u3011<\/span> \u3082\u3063\u3068\u8aad\u3080 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":14229,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","_themeisle_gutenberg_block_has_review":false},"categories":[126],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/posts\/5338"}],"collection":[{"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/comments?post=5338"}],"version-history":[{"count":7,"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/posts\/5338\/revisions"}],"predecessor-version":[{"id":14230,"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/posts\/5338\/revisions\/14230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/media\/14229"}],"wp:attachment":[{"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/media?parent=5338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/categories?post=5338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tetsumag.com\/blog\/wp-json\/wp\/v2\/tags?post=5338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}