{"id":2452,"date":"2024-02-22T04:49:06","date_gmt":"2024-02-21T19:49:06","guid":{"rendered":"https:\/\/mindtech.jp\/?p=2452"},"modified":"2024-02-22T04:49:07","modified_gmt":"2024-02-21T19:49:07","slug":"post-2452","status":"publish","type":"post","link":"https:\/\/mindtech.jp\/?p=2452","title":{"rendered":"JupyterLab\/JupyterNotebook\u3067\u3001Pandas Dataframe\u306e\u5217\u3092\u7701\u7565\u305b\u305a\u306b\u8868\u793a\u3059\u308b\u8a2d\u5b9a"},"content":{"rendered":"\n<p>JupyterLab\/JupyterNotebook \u3067\u306f\u3001Pandas Dataframe \u3092\u76f4\u63a5\u306b\u8a18\u8ff0\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092\u304d\u308c\u3044\u306a\u8868\u5f62\u5f0f\u306b\u3057\u3066\u8868\u793a\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3057\u3001\u5217\u540d\u304c\u591a\u304f\u306a\u3063\u3066\u304f\u308b\u3068\u3001\u4e2d\u9593\u306e\u5217\u3092\u7701\u7565\u3057\u3001\u521d\u3081\u3068\u6700\u5f8c\u306e\u3044\u304f\u3064\u304b\u306e\u5217\u3092\u8868\u793a\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br>\u8868\u793a\u3059\u308b\u5217\u3092\u7d5e\u308b\u3068\u3044\u3046\u3084\u308a\u65b9\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u3066\u3082\u5168\u4f53\u3092\u898b\u305f\u3044\u6642\u306f\u307e\u307e\u3042\u308a\u307e\u3059\u3002<br>\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306e\u8a2d\u5b9a\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pandas as pd\r\n\n# \u5217\u540d\u306e\u7701\u7565\u3092\u7121\u52b9\u306b\u3059\u308b\r\npd.set_option('display.max_columns', None)  # \u5217\u306e\u6570\u306b\u5236\u9650\u3092\u8a2d\u3051\u306a\u3044\r\npd.set_option('display.expand_frame_repr', False)  # DataFrame\u3092\u6c34\u5e73\u65b9\u5411\u306b\u6298\u308a\u8fd4\u3055\u306a\u3044\n\ndf # \u8868\u793a\u3057\u305f\u3044\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\r<\/code><\/pre>\n\n\n\n<p>df \u306e\u5217\u306e\u3046\u3061\u3001\u8868\u793a\u3057\u305f\u3044\u5217\u3092\u9650\u5b9a\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df&#91; &#91;\"a\", \"b\", \"c\"] ]<\/code><\/pre>\n\n\n\n<p>\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3001a,b,c \u5217\u306e\u307f\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u3053\u308c\u306f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>columns = &#91; \"a\", \"b\", \"c\" ]\ndf&#91; columns ]<\/code><\/pre>\n\n\n\n<p>\u306e\u3088\u3046\u306b\u3082\u66f8\u3051\u307e\u3059\u3002<br>\u306a\u304a\u3001\u8868\u793a\u306e\u30bb\u30eb\u5e45\u3092\u8abf\u6574\u3057\u3066\u3001\u30c7\u30fc\u30bf\u304c\u753b\u9762\u306b\u53ce\u307e\u308b\u3088\u3046\u306b\u5e45\u3092\u8abf\u7bc0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u30bb\u30eb\u306e\u5e45\u3092\u8abf\u6574\nfrom IPython.core.display import display, HTML\ndisplay(HTML(\"&lt;style>.container { width:100% !important; }&lt;\/style>\"))<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JupyterLab\/JupyterNotebook \u3067\u306f\u3001Pandas Dataframe \u3092\u76f4\u63a5\u306b\u8a18\u8ff0\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092\u304d\u308c\u3044\u306a\u8868\u5f62\u5f0f\u306b\u3057\u3066\u8868\u793a\u3057\u3066\u304f\u308c\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u5217\u540d\u304c\u591a\u304f\u306a\u3063\u3066\u304f\u308b\u3068\u3001\u4e2d\u9593\u306e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[466,479,34,54],"class_list":["post-2452","post","type-post","status-publish","format-standard","hentry","category-6","tag-jupyterlab","tag-jupyternotebook","tag-python","tag-54"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4rHn0-Dy","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2452"}],"version-history":[{"count":1,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2452\/revisions"}],"predecessor-version":[{"id":2453,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2452\/revisions\/2453"}],"wp:attachment":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}