{"id":3566,"date":"2023-07-16T19:43:48","date_gmt":"2023-07-16T19:43:48","guid":{"rendered":"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/"},"modified":"2023-07-16T19:43:48","modified_gmt":"2023-07-16T19:43:48","slug":"%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/","title":{"rendered":"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e r \u7684 mutate() \u51fd\u6570"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><span style=\"color: #000000;\">\u5728 R \u7f16\u7a0b\u8bed\u8a00\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<strong>dplyr<\/strong>\u5305\u4e2d\u7684<strong>mutate()<\/strong>\u51fd\u6570\u5feb\u901f\u5c06\u65b0\u5217\u6dfb\u52a0\u5230\u6839\u636e\u73b0\u6709\u5217\u8ba1\u7b97\u7684\u6570\u636e\u5e27\u4e2d\u3002<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u4ee5\u4e0b\u4ee3\u7801\u663e\u793a\u5982\u4f55\u8ba1\u7b97 R \u4e2d\u7279\u5b9a\u5217\u7684\u5e73\u5747\u503c\u5e76\u5c06\u8be5\u503c\u6dfb\u52a0\u4e3a\u6570\u636e\u6846\u4e2d\u7684\u65b0\u5217\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">library<\/span> (dplyr)\n\n<span style=\"color: #008080;\">#create data frame\n<\/span>df &lt;- data. <span style=\"color: #3366ff;\">frame<\/span> (team=c('A', 'A', 'A', 'A', 'B', 'B', 'B', 'B'),\n                 points=c(30, 22, 19, 14, 14, 11, 20, 28))\n\n<span style=\"color: #008080;\">#add new column that shows mean points by team\n<\/span>df &lt;- df %&gt;%\n      group_by(team) %&gt;%\n      mutate(mean_points = mean(points))\n\n<span style=\"color: #008080;\">#view updated data frame\n<\/span>df\n\n  team points mean_points           \n1 to 30 21.2\n2 A 22 21.2\n3 A 19 21.2\n4 A 14 21.2\n5 B 14 18.2\n6 B 11 18.2\n7 B 20 18.2\n8 B 28 18.2\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">pandas \u4e2d<strong>mutate()<\/strong>\u51fd\u6570\u7684\u7b49\u6548\u9879\u662f<strong>transform()<\/strong>\u51fd\u6570\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e0b\u9762\u7684\u4f8b\u5b50\u5c55\u793a\u4e86\u5982\u4f55\u5728\u5b9e\u9645\u4e2d\u4f7f\u7528\u8fd9\u4e2a\u529f\u80fd\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528pandas \u4e2d\u7684transform() \u6765\u590d\u5236R \u4e2d\u7684mutate()<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u5047\u8bbe\u6211\u4eec\u6709\u4ee5\u4e0b pandas DataFrame\uff0c\u663e\u793a\u6765\u81ea\u4e0d\u540c\u7403\u961f\u7684\u7bee\u7403\u8fd0\u52a8\u5458\u7684\u5f97\u5206\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd\n\n<span style=\"color: #008080;\">#createDataFrame\n<span style=\"color: #000000;\">df = pd. <span style=\"color: #3366ff;\">DataFrame<\/span> ({' <span style=\"color: #ff0000;\">team<\/span> ': ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B'],\n                   ' <span style=\"color: #ff0000;\">points<\/span> ': [30, 22, 19, 14, 14, 11, 20, 28]})<\/span>\n\n#view DataFrame\n<span style=\"color: #000000;\"><span style=\"color: #008000;\">print<\/span> (df)\n\n  team points\n0 to 30\n1 to 22\n2 to 19\n3 to 14\n4 B 14\n5 B 11\n6 B 20\n7 B 28\n<\/span><\/span><\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<strong>transform()<\/strong>\u51fd\u6570\u6dfb\u52a0\u4e00\u4e2a\u540d\u4e3a<strong>Mean_points<\/strong>\u7684\u65b0\u5217\uff0c\u8be5\u5217\u663e\u793a\u6bcf\u4e2a\u56e2\u961f\u7684\u5e73\u5747\u5f97\u5206\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#add new column to DataFrame that shows mean points by team\n<\/span>df[' <span style=\"color: #ff0000;\">mean_points<\/span> '] = df. <span style=\"color: #3366ff;\">groupby<\/span> (' <span style=\"color: #ff0000;\">team<\/span> ')[' <span style=\"color: #ff0000;\">points<\/span> ']. <span style=\"color: #3366ff;\">transform<\/span> (' <span style=\"color: #ff0000;\">mean<\/span> ')\n\n<span style=\"color: #008080;\">#view updated DataFrame\n<\/span><span style=\"color: #008000;\">print<\/span> (df)\n\n  team points mean_points\n0 to 30 21.25\n1 to 22 21.25\n2 A 19 21.25\n3 to 14 21.25\n4 B 14 18.25\n5 B 11 18.25\n6 B 20 18.25\n7 B 28 18.25\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">A \u961f\u7403\u5458\u7684\u5e73\u5747\u5f97\u5206\u4e3a<strong>21.25<\/strong> \uff0cB \u961f\u7403\u5458\u7684\u5e73\u5747\u5f97\u5206\u4e3a<strong>18.25<\/strong> \uff0c\u56e0\u6b64\u8fd9\u4e9b\u503c\u88ab\u76f8\u5e94\u5730\u5206\u914d\u7ed9\u65b0\u5217\u4e2d\u7684\u6bcf\u4e2a\u7403\u5458\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8bf7\u6ce8\u610f\uff0c\u8fd9\u4e0e\u4ecb\u7ecd\u6027\u793a\u4f8b\u4e2d\u4f7f\u7528<strong>mutate()<\/strong>\u51fd\u6570\u83b7\u5f97\u7684\u7ed3\u679c\u76f8\u5339\u914d\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5728<strong>transform()<\/strong>\u51fd\u6570\u4e2d\u4f7f\u7528<strong>lambda<\/strong>\u6765\u6267\u884c\u81ea\u5b9a\u4e49\u8ba1\u7b97\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528<strong>lambda<\/strong>\u8ba1\u7b97<\/span><span style=\"color: #000000;\">\u5404\u81ea\u7403\u961f\u4e2d\u6bcf\u4e2a\u7403\u5458\u7684\u603b\u5f97\u5206\u767e\u5206\u6bd4\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create new column called percent_of_points\n<span style=\"color: #000000;\">df[' <span style=\"color: #ff0000;\">percent_of_points<\/span> '] = df. <span style=\"color: #3366ff;\">groupby<\/span> (' <span style=\"color: #ff0000;\">team<\/span> ')[' <span style=\"color: #ff0000;\">points<\/span> ']. <span style=\"color: #3366ff;\">transform<\/span> ( <span style=\"color: #008000;\">lambda<\/span> x:x\/ <span style=\"color: #3366ff;\">x.sum<\/span> ())\n<\/span>\n#view updated DataFrame\n<span style=\"color: #000000;\"><span style=\"color: #008000;\">print<\/span> (df)\n\n  team points percent_of_points\n0 A 30 0.352941\n1 A 22 0.258824\n2 A 19 0.223529\n3 A 14 0.164706\n4 B 14 0.191781\n5 B 11 0.150685\n6 B 20 0.273973\n7 B 28 0.383562\n<\/span><\/span><\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u662f\u5982\u4f55\u89e3\u91ca\u7ed3\u679c\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">A\u961f\u7684\u7b2c\u4e00\u540d\u7403\u5458\u5728A\u961f\u603b\u517185\u5206\u4e2d\u5f97\u5230\u4e8630\u5206\uff0c\u56e0\u6b64\u4ed6\u5360\u603b\u5206\u7684\u6bd4\u4f8b\u4e3a30\/85 = <strong>0.352941<\/strong> \u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\">A\u961f\u7b2c\u4e8c\u540d\u9009\u624b\u5728A\u961f\u603b\u517185\u5206\u4e2d\u5f97\u5230\u4e8622\u5206\uff0c\u56e0\u6b64\u4ed6\u5360\u603b\u5206\u7684\u6bd4\u4f8b\u4e3a22\/85= <strong>0.258824<\/strong> \u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u7b49\u7b49\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8bf7\u6ce8\u610f\uff0c\u6211\u4eec\u53ef\u4ee5\u5728<strong>Transform()<\/strong>\u51fd\u6570\u4e2d\u4f7f\u7528<strong>lambda<\/strong>\u53c2\u6570\u6765\u6267\u884c\u6211\u4eec\u60f3\u8981\u7684\u4efb\u4f55\u81ea\u5b9a\u4e49\u8ba1\u7b97\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u5176\u4ed6\u8d44\u6e90<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u6559\u7a0b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 pandas \u4e2d\u6267\u884c\u5176\u4ed6\u5e38\u89c1\u64cd\u4f5c\uff1a<\/span><\/p>\n<p><a href=\"https:\/\/statorials.org\/cn\/pandas-groupby-\u603b\u548c\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728 Pandas \u4e2d\u6267\u884c GroupBy \u6c42\u548c<\/a><br \/><a href=\"https:\/\/statorials.org\/cn\/pandas-\u6309\u60c5\u8282\u5206\u7ec4\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728 Pandas \u4e2d\u4f7f\u7528 Groupby \u548c Plot<\/a><br \/><a href=\"https:\/\/statorials.org\/cn\/pandas-groupby-\u8ba1\u6570\u552f\u4e00\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728 Pandas \u4e2d\u4f7f\u7528 GroupBy \u8ba1\u7b97\u552f\u4e00\u503c<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 R \u7f16\u7a0b\u8bed\u8a00\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528dplyr\u5305\u4e2d\u7684mutate()\u51fd\u6570\u5feb\u901f\u5c06\u65b0\u5217\u6dfb\u52a0\u5230\u6839\u636e\u73b0\u6709\u5217\u8ba1\u7b97\u7684\u6570\u636e\u5e27\u4e2d\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-3566","post","type-post","status-publish","format-standard","hentry","category-11"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e R \u7684 mutate() \u51fd\u6570 - Statorials<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u901a\u8fc7\u4e00\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u4f7f\u7528 R \u4e2d mutate() \u51fd\u6570\u7684 Python \u7b49\u6548\u9879\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/cn\/\u718a\u732b\u53d8\u5f02\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e R \u7684 mutate() \u51fd\u6570 - Statorials\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u901a\u8fc7\u4e00\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u4f7f\u7528 R \u4e2d mutate() \u51fd\u6570\u7684 Python \u7b49\u6548\u9879\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/\u718a\u732b\u53d8\u5f02\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-16T19:43:48+00:00\" \/>\n<meta name=\"author\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/\",\"url\":\"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/\",\"name\":\"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e R \u7684 mutate() \u51fd\u6570 - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-16T19:43:48+00:00\",\"dateModified\":\"2023-07-16T19:43:48+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u901a\u8fc7\u4e00\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u4f7f\u7528 R \u4e2d mutate() \u51fd\u6570\u7684 Python \u7b49\u6548\u9879\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e r \u7684 mutate() \u51fd\u6570\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/cn\/#website\",\"url\":\"https:\/\/statorials.org\/cn\/\",\"name\":\"Statorials\",\"description\":\"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\",\"name\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\"},\"description\":\"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a\",\"sameAs\":[\"https:\/\/statorials.org\/cn\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e R \u7684 mutate() \u51fd\u6570 - Statorials","description":"\u672c\u6559\u7a0b\u901a\u8fc7\u4e00\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u4f7f\u7528 R \u4e2d mutate() \u51fd\u6570\u7684 Python \u7b49\u6548\u9879\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/cn\/\u718a\u732b\u53d8\u5f02\/","og_locale":"zh_CN","og_type":"article","og_title":"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e R \u7684 mutate() \u51fd\u6570 - Statorials","og_description":"\u672c\u6559\u7a0b\u901a\u8fc7\u4e00\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u4f7f\u7528 R \u4e2d mutate() \u51fd\u6570\u7684 Python \u7b49\u6548\u9879\u3002","og_url":"https:\/\/statorials.org\/cn\/\u718a\u732b\u53d8\u5f02\/","og_site_name":"Statorials","article_published_time":"2023-07-16T19:43:48+00:00","author":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/","url":"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/","name":"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e R \u7684 mutate() \u51fd\u6570 - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-16T19:43:48+00:00","dateModified":"2023-07-16T19:43:48+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u901a\u8fc7\u4e00\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u4f7f\u7528 R \u4e2d mutate() \u51fd\u6570\u7684 Python \u7b49\u6548\u9879\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/%e7%86%8a%e7%8c%ab%e5%8f%98%e5%bc%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"Pandas\uff1a\u5982\u4f55\u4f7f\u7528\u76f8\u5f53\u4e8e r \u7684 mutate() \u51fd\u6570"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/cn\/#website","url":"https:\/\/statorials.org\/cn\/","name":"Statorials","description":"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261","name":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a"},"description":"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a","sameAs":["https:\/\/statorials.org\/cn"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/3566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/comments?post=3566"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/3566\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=3566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=3566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=3566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}