{"id":70590,"date":"2026-02-02T04:41:04","date_gmt":"2026-02-01T20:41:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/70590.html"},"modified":"2026-02-02T04:41:04","modified_gmt":"2026-02-01T20:41:04","slug":"rainfall-%ef%bc%9c400-%e5%92%8crainfallrainfall-%ef%bc%9c400%e7%9a%84%e5%8c%ba%e5%88%ab","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/70590.html","title":{"rendered":"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>\u5728 pandas \u4e2d&#xff0c;rainfall &lt; 400 \u548c rainfall[rainfall &lt; 400] \u662f\u6570\u636e\u7b5b\u9009\u7684\u4e24\u4e2a\u6838\u5fc3\u6b65\u9aa4&#xff0c;\u524d\u8005\u751f\u6210\u5e03\u5c14\u63a9\u7801&#xff08;\u5224\u65ad\u77e9\u9635&#xff09;&#xff0c;\u540e\u8005\u57fa\u4e8e\u8be5\u63a9\u7801\u5b9e\u73b0\u6570\u636e\u7b5b\u9009\u53d6\u503c&#xff0c;\u4e8c\u8005\u662f\u4f9d\u8d56\u5173\u7cfb&#xff08;\u540e\u8005\u5fc5\u987b\u57fa\u4e8e\u524d\u8005\u624d\u80fd\u751f\u6548&#xff09;&#xff0c;\u6838\u5fc3\u533a\u522b\u548c\u4f7f\u7528\u903b\u8f91\u5982\u4e0b&#xff0c;\u7ed3\u5408\u4e4b\u524d\u7684\u964d\u96e8\u91cf DataFrame \u5b9e\u4f8b\u8bb2\u89e3\u66f4\u6613\u7406\u89e3\u3002<br \/>\n\u5148\u660e\u786e\u793a\u4f8b\u57fa\u7840&#xff08;\u57fa\u4e8e\u63a8\u8350\u7684 2 \u884c 3 \u5217 DataFrame&#xff09;<br \/>\n\u5148\u590d\u7528\u4fee\u6b63\u540e\u7684\u53ef\u8fd0\u884c\u4ee3\u7801&#xff0c;\u786e\u5b9a\u57fa\u7840\u6570\u636e\u7ed3\u6784&#xff0c;\u540e\u7eed\u6240\u6709\u5206\u6790\u57fa\u4e8e\u6b64&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> pandas <span class=\"token keyword\">as<\/span> pd<br \/>\nrainfall <span class=\"token operator\">&#061;<\/span> pd<span class=\"token punctuation\">.<\/span>DataFrame<span class=\"token punctuation\">(<\/span><br \/>\n    data<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string\">&#034;City 1&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">300.1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">100.2<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;City 2&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">400.3<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">300.4<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;City 3&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">1000.5<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1100.6<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>rainfall<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u57fa\u7840\u6570\u636e&#xff1a;2\u884c&#xff08;\u884c\u7d22\u5f150\/1&#xff09;\u30013\u5217&#xff08;City1\/City2\/City3&#xff09;<\/span><br \/>\n<span class=\"token comment\">#    City 1  City 2   City 3<\/span><br \/>\n<span class=\"token comment\"># 0   300.1   400.3   1000.5<\/span><br \/>\n<span class=\"token comment\"># 1   100.2   300.4   1100.6<\/span><\/p>\n<h2>\u4e00\u3001rainfall &lt; 400&#xff1a;\u751f\u6210\u5e03\u5c14\u63a9\u7801&#xff08;Boolean Mask&#xff09;<\/h2>\n<p>\u6838\u5fc3\u4f5c\u7528<br \/>\n\u5bf9 DataFrame \u4e2d\u7684\u6bcf\u4e00\u4e2a\u5143\u7d20\u9010\u4e00\u8fdb\u884c\u300c\u662f\u5426\u5c0f\u4e8e 400\u300d\u7684\u5224\u65ad&#xff0c;\u8fd4\u56de\u4e00\u4e2a\u548c\u539f DataFrame \u884c\u5217\u7ed3\u6784\u5b8c\u5168\u4e00\u81f4\u7684\u65b0 DataFrame&#xff0c;\u5176\u4e2d\u6bcf\u4e2a\u4f4d\u7f6e\u7684\u503c\u53ea\u6709 True&#xff08;\u6ee1\u8db3\u6761\u4ef6&#xff1a;&lt;400&#xff09;\u6216 False&#xff08;\u4e0d\u6ee1\u8db3\u6761\u4ef6&#xff1a;\u2265400&#xff09;\u2014\u2014 \u8fd9\u4e2a\u65b0\u7684\u5e03\u5c14\u578b DataFrame \u5c31\u662f\u5e03\u5c14\u63a9\u7801&#xff0c;\u4ec5\u7528\u4e8e\u300c\u6761\u4ef6\u5224\u65ad\u300d&#xff0c;\u4e0d\u76f4\u63a5\u8fd4\u56de\u539f\u6570\u636e\u3002<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>rainfall <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">400<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u884c\u5217\u548c\u539f\u6570\u636e\u5b8c\u5168\u4e00\u81f4&#xff0c;\u4ec5\u5b58True\/False<\/span><br \/>\n<span class=\"token comment\">#    City 1  City 2  City 3<\/span><br \/>\n<span class=\"token comment\"># 0    True   False   False<\/span><br \/>\n<span class=\"token comment\"># 1    True    True   False<\/span><\/p>\n<p>\u5173\u952e\u7279\u6027<\/p>\n<li>\u7ed3\u6784\u4e00\u81f4&#xff1a;\u884c\u6570\u3001\u5217\u6570\u3001\u7d22\u5f15 \/ \u5217\u540d\u548c\u539f DataFrame \u5b8c\u5168\u76f8\u540c&#xff0c;\u4e00\u4e00\u5bf9\u5e94&#xff1b;<\/li>\n<li>\u7c7b\u578b\u4e3a\u5e03\u5c14&#xff1a;\u6240\u6709\u503c\u90fd\u662f bool \u7c7b\u578b&#xff0c;\u65e0\u539f\u6570\u636e\u7684\u6570\u503c&#xff1b;<\/li>\n<li>\u4ec5\u505a\u5224\u65ad&#xff1a;\u4e0d\u7b5b\u9009\u3001\u4e0d\u63d0\u53d6\u539f\u6570\u636e&#xff0c;\u4ec5\u6807\u8bb0\u300c\u54ea\u4e9b\u4f4d\u7f6e\u6ee1\u8db3\u6761\u4ef6\u300d\u3002<\/li>\n<h2>\u4e8c\u3001rainfall[rainfall &lt; 400]&#xff1a;\u57fa\u4e8e\u5e03\u5c14\u63a9\u7801\u7b5b\u9009\u5e76\u63d0\u53d6\u539f\u6570\u636e<\/h2>\n<p>\u6838\u5fc3\u4f5c\u7528<br \/>\n\u5c06 rainfall &lt; 400 \u751f\u6210\u7684\u5e03\u5c14\u63a9\u7801\u4f5c\u4e3a\u884c \/ \u5217\u7b5b\u9009\u6761\u4ef6\u4f20\u5165\u539f DataFrame \u7684\u4e2d\u62ec\u53f7 []&#xff0c;\u5b9e\u73b0&#xff1a;<br \/>\n\u5bf9\u539f DataFrame \u4e2d\u6bcf\u4e00\u4e2a\u4f4d\u7f6e&#xff0c;\u82e5\u63a9\u7801\u5bf9\u5e94\u4f4d\u7f6e\u4e3a True&#xff1a;\u4fdd\u7559\u539f\u6570\u636e\u7684\u6570\u503c&#xff1b;<br \/>\n\u82e5\u63a9\u7801\u5bf9\u5e94\u4f4d\u7f6e\u4e3a False&#xff1a;\u7528 NaN&#xff08;\u975e\u6570\u503c&#xff09;\u586b\u5145&#xff0c;\u4ee3\u8868\u8be5\u4f4d\u7f6e\u4e0d\u6ee1\u8db3\u6761\u4ef6\u3002<br \/>\n\u6700\u7ec8\u8fd4\u56de\u4e00\u4e2a\u548c\u539f DataFrame \u884c\u5217\u7ed3\u6784\u4ecd\u4e00\u81f4\u7684\u65b0 DataFrame&#xff0c;\u5176\u4e2d\u300c\u6ee1\u8db3\u6761\u4ef6\u7684\u4f4d\u7f6e\u4fdd\u7559\u539f\u6570\u503c&#xff0c;\u4e0d\u6ee1\u8db3\u7684\u4f4d\u7f6e\u4e3a NaN\u300d\u2014\u2014 \u8fd9\u662f pandas \u4e2d\u6309\u6761\u4ef6\u7b5b\u9009\u5143\u7d20\u7684\u6807\u51c6\u7528\u6cd5\u3002<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>rainfall<span class=\"token punctuation\">[<\/span>rainfall <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">400<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u884c\u5217\u7ed3\u6784\u4e0d\u53d8&#xff0c;\u6ee1\u8db3\u6761\u4ef6\u4fdd\u7559\u539f\u503c&#xff0c;\u4e0d\u6ee1\u8db3\u4e3aNaN<\/span><br \/>\n<span class=\"token comment\">#    City 1  City 2  City 3<\/span><br \/>\n<span class=\"token comment\"># 0   300.1     NaN     NaN<\/span><br \/>\n<span class=\"token comment\"># 1   100.2   300.4     NaN<\/span><\/p>\n<h3>\u5173\u952e\u7279\u6027<\/h3>\n<p>\u7ed3\u6784\u4e0d\u53d8&#xff1a;\u884c\u6570\u3001\u5217\u6570\u3001\u7d22\u5f15 \/ \u5217\u540d\u4ecd\u548c\u539f DataFrame \u4e00\u81f4&#xff1b;<br \/>\n\u4fdd\u7559\u539f\u6570\u503c&#xff1a;\u6ee1\u8db3\u6761\u4ef6\u7684\u4f4d\u7f6e\u76f4\u63a5\u63d0\u53d6\u539f\u6570\u636e\u7684\u6570\u503c&#xff0c;\u7c7b\u578b\u4e0d\u53d8&#xff1b;<br \/>\n\u4e0d\u6ee1\u8db3\u586b NaN&#xff1a;NaN \u662f pandas \u4e2d\u7f3a\u5931\u503c\u7684\u6807\u51c6\u8868\u793a&#xff0c;\u65b9\u4fbf\u540e\u7eed\u7f3a\u5931\u503c\u5904\u7406&#xff08;\u5982\u5220\u9664\u3001\u586b\u5145&#xff09;&#xff1b;<br \/>\n\u4f9d\u8d56\u63a9\u7801&#xff1a;\u4e2d\u62ec\u53f7\u5185\u5fc5\u987b\u662f\u548c\u539f DataFrame \u884c\u5217\u7ed3\u6784\u4e00\u81f4\u7684\u5e03\u5c14\u63a9\u7801&#xff0c;\u5426\u5219\u4f1a\u62a5\u9519\u3002<\/p>\n<h2>\u4e09\u3001\u6838\u5fc3\u533a\u522b\u603b\u7ed3&#xff08;\u8868\u683c\u5bf9\u6bd4&#xff0c;\u4e00\u76ee\u4e86\u7136&#xff09;<\/h2>\n<table>\n<tr>\u8868\u8fbe\u5f0f\u6838\u5fc3\u7c7b\u578b\u884c\u5217\u7ed3\u6784\u5b58\u50a8\u503c\u7c7b\u578b\u6838\u5fc3\u4f5c\u7528\u7ed3\u679c\u793a\u4f8b&#xff08;City2 \u5217&#xff09;<\/tr>\n<tbody>\n<tr>\n<td>rainfall &lt; 400<\/td>\n<td>\u5e03\u5c14\u578b DataFrame<\/td>\n<td>\u548c\u539f\u6570\u636e\u4e00\u81f4<\/td>\n<td>True\/False<\/td>\n<td>\u751f\u6210\u6761\u4ef6\u5224\u65ad\u63a9\u7801<\/td>\n<td>[False, True]<\/td>\n<\/tr>\n<tr>\n<td>rainfall[rainfall &lt; 400]<\/td>\n<td>\u6570\u503c\u578b DataFrame&#xff08;\u542b NaN&#xff09;<\/td>\n<td>\u548c\u539f\u6570\u636e\u4e00\u81f4<\/td>\n<td>\u539f\u6570\u503c \/ NaN<\/td>\n<td>\u57fa\u4e8e\u63a9\u7801\u7b5b\u9009\u63d0\u53d6\u539f\u6570\u636e<\/td>\n<td>[NaN, 300.4]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u56db\u3001\u62d3\u5c55&#xff1a;\u5982\u4f55\u63d0\u53d6\u300c\u4ec5\u6ee1\u8db3\u6761\u4ef6\u7684\u7eaf\u6570\u503c&#xff08;\u65e0 NaN\u3001\u65e0\u7ed3\u6784&#xff09;\u300d&#xff1f;<\/h2>\n<p>\u5982\u679c\u9700\u8981\u53ea\u83b7\u53d6\u6240\u6709 &lt; 400 \u7684\u6570\u503c&#xff0c;\u4e0d\u4fdd\u7559\u539f\u884c\u5217\u7ed3\u6784\u3001\u4e0d\u542b NaN&#xff0c;\u53ef\u5728\u63a9\u7801\u7b5b\u9009\u540e\u52a0 .dropna()&#xff08;\u5220\u9664\u7f3a\u5931\u503c&#xff09;\u6216 .stack()&#xff08;\u5806\u53e0\u4e3a\u4e00\u7ef4&#xff09;&#xff0c;\u5e38\u7528\u5199\u6cd5&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u63d0\u53d6\u6240\u6709\u6ee1\u8db3\u6761\u4ef6\u7684\u6570\u503c&#xff0c;\u8fd4\u56de\u4e00\u7ef4Series<\/span><br \/>\nvalid_rain <span class=\"token operator\">&#061;<\/span> rainfall<span class=\"token punctuation\">[<\/span>rainfall <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">400<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>stack<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>valid_rain<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u8f93\u51fa&#xff1a;\u4ec5\u4fdd\u7559\u6ee1\u8db3\u6761\u4ef6\u7684\u539f\u503c&#xff0c;\u5e26\u539f\u7d22\u5f15<\/span><br \/>\n<span class=\"token comment\"># 0  City 1    300.1<\/span><br \/>\n<span class=\"token comment\"># 1  City 1    100.2<\/span><br \/>\n<span class=\"token comment\">#    City 2    300.4<\/span><br \/>\n<span class=\"token comment\"># dtype: float64<\/span><\/p>\n<p><span class=\"token comment\"># \u8fdb\u4e00\u6b65\u8f6c\u4e3a\u7eaf\u5217\u8868<\/span><br \/>\nvalid_rain_list <span class=\"token operator\">&#061;<\/span> valid_rain<span class=\"token punctuation\">.<\/span>tolist<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>valid_rain_list<span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># [300.1, 100.2, 300.4]<\/span><\/p>\n<h2>\u4e94\u3001\u8bb0\u5fc6\u53e3\u8bc0<\/h2>\n<p>\u5148\u5224\u65ad&#xff0c;\u540e\u7b5b\u9009&#xff1b;\u63a9\u7801\u662f\u524d\u63d0&#xff0c;\u53d6\u503c\u9760\u4e2d\u62ec\u53f7\u3002<br \/>\nrainfall <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">400<\/span> \u2192 \u9010\u4e2a\u5224\u65ad\u6253\u6807\u7b7e&#xff08;<span class=\"token boolean\">True<\/span><span class=\"token operator\">\/<\/span><span class=\"token boolean\">False<\/span>&#xff09;<br \/>\nrainfall<span class=\"token punctuation\">[<\/span>\u63a9\u7801<span class=\"token punctuation\">]<\/span> \u2192 \u6309\u6807\u7b7e\u53d6\u503c&#xff08;\u7559\u539f\u503c<span class=\"token operator\">\/<\/span>\u586bNaN&#xff09;<\/p>\n<h2>\u6700\u7ec8\u603b\u7ed3<\/h2>\n<li>rainfall &lt; 400 \u662f\u6761\u4ef6\u5224\u65ad\u6b65\u9aa4&#xff0c;\u751f\u6210\u548c\u539f\u6570\u636e\u540c\u7ed3\u6784\u7684\u5e03\u5c14\u63a9\u7801&#xff0c;\u4ec5\u6807\u8bb0\u6ee1\u8db3\u6761\u4ef6\u7684\u4f4d\u7f6e&#xff0c;\u65e0\u539f\u6570\u503c&#xff1b;<\/li>\n<li>rainfall[rainfall &lt; 400] \u662f\u6570\u636e\u63d0\u53d6\u6b65\u9aa4&#xff0c;\u57fa\u4e8e\u524d\u4e00\u6b65\u7684\u5e03\u5c14\u63a9\u7801&#xff0c;\u4ece\u539f\u6570\u636e\u4e2d\u7b5b\u9009\u63d0\u53d6\u6ee1\u8db3\u6761\u4ef6\u7684\u6570\u503c&#xff0c;\u4e0d\u6ee1\u8db3\u7684\u4f4d\u7f6e\u586b NaN&#xff0c;\u4fdd\u7559\u539f\u884c\u5217\u7ed3\u6784&#xff1b;<\/li>\n<li>\u4e8c\u8005\u662f\u5148\u540e\u4f9d\u8d56\u5173\u7cfb&#xff0c;\u540e\u8005\u5fc5\u987b\u4ee5\u524d\u8005\u751f\u6210\u7684\u5e03\u5c14\u63a9\u7801\u4e3a\u6761\u4ef6&#xff0c;\u662f pandas \u6309\u5143\u7d20\u6761\u4ef6\u7b5b\u9009\u7684\u6838\u5fc3\u7ec4\u5408\u7528\u6cd5&#xff1b;<\/li>\n<li>\u82e5\u9700\u7eaf\u6ee1\u8db3\u6761\u4ef6\u7684\u6570\u503c&#xff0c;\u53ef\u5728\u7b5b\u9009\u540e\u7528 .stack()\/.dropna() \u8fdb\u4e00\u6b65\u5904\u7406&#xff0c;\u53bb\u9664 NaN \u548c\u539f\u7ed3\u6784\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00<br \/>\n\u5728 pandas \u4e2d&#xff0c;rainfall &lt; 400 \u548c rainfall[rainfall &lt; 400] \u662f\u6570\u636e\u7b5b\u9009\u7684\u4e24\u4e2a\u6838\u5fc3\u6b65\u9aa4&#xff0c;\u524d\u8005\u751f\u6210\u5e03\u5c14\u63a9\u7801&#xff08;\u5224\u65ad\u77e9\u9635&#xff09;&#xff0c;\u540e\u8005\u57fa\u4e8e\u8be5\u63a9\u7801\u5b9e\u73b0\u6570\u636e\u7b5b\u9009\u53d6\u503c&#xff0c;\u4e8c\u8005\u662f\u4f9d\u8d56\u5173\u7cfb&#xff08;\u540e\u8005\u5fc5\u987b\u57fa\u4e8e\u524d\u8005\u624d\u80fd\u751f\u6548&#xff09;&#xff0c;\u6838\u5fc3\u533a\u522b\u548c\u4f7f\u7528\u903b\u8f91\u5982\u4e0b&#xff0c;\u7ed3\u5408\u4e4b\u524d\u7684\u964d\u96e8\u91cf DataFrame \u5b9e\u4f8b\u8bb2\u89e3\u66f4\u6613\u7406\u89e3\u3002<br \/>\n\u5148\u660e\u786e\u793a\u4f8b\u57fa\u7840<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4278,81,62],"topic":[],"class_list":["post-70590","post","type-post","status-publish","format-standard","hentry","category-server","tag-pandas","tag-python","tag-62"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/70590.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00 \u5728 pandas \u4e2d&#xff0c;rainfall &lt; 400 \u548c rainfall[rainfall &lt; 400] \u662f\u6570\u636e\u7b5b\u9009\u7684\u4e24\u4e2a\u6838\u5fc3\u6b65\u9aa4&#xff0c;\u524d\u8005\u751f\u6210\u5e03\u5c14\u63a9\u7801&#xff08;\u5224\u65ad\u77e9\u9635&#xff09;&#xff0c;\u540e\u8005\u57fa\u4e8e\u8be5\u63a9\u7801\u5b9e\u73b0\u6570\u636e\u7b5b\u9009\u53d6\u503c&#xff0c;\u4e8c\u8005\u662f\u4f9d\u8d56\u5173\u7cfb&#xff08;\u540e\u8005\u5fc5\u987b\u57fa\u4e8e\u524d\u8005\u624d\u80fd\u751f\u6548&#xff09;&#xff0c;\u6838\u5fc3\u533a\u522b\u548c\u4f7f\u7528\u903b\u8f91\u5982\u4e0b&#xff0c;\u7ed3\u5408\u4e4b\u524d\u7684\u964d\u96e8\u91cf DataFrame \u5b9e\u4f8b\u8bb2\u89e3\u66f4\u6613\u7406\u89e3\u3002 \u5148\u660e\u786e\u793a\u4f8b\u57fa\u7840\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/70590.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-01T20:41:04+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/70590.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/70590.html\",\"name\":\"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-01T20:41:04+00:00\",\"dateModified\":\"2026-02-01T20:41:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/70590.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/70590.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/70590.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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:\/\/www.wsisp.com\/helps\/70590.html","og_locale":"zh_CN","og_type":"article","og_title":"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u8a00 \u5728 pandas \u4e2d&#xff0c;rainfall &lt; 400 \u548c rainfall[rainfall &lt; 400] \u662f\u6570\u636e\u7b5b\u9009\u7684\u4e24\u4e2a\u6838\u5fc3\u6b65\u9aa4&#xff0c;\u524d\u8005\u751f\u6210\u5e03\u5c14\u63a9\u7801&#xff08;\u5224\u65ad\u77e9\u9635&#xff09;&#xff0c;\u540e\u8005\u57fa\u4e8e\u8be5\u63a9\u7801\u5b9e\u73b0\u6570\u636e\u7b5b\u9009\u53d6\u503c&#xff0c;\u4e8c\u8005\u662f\u4f9d\u8d56\u5173\u7cfb&#xff08;\u540e\u8005\u5fc5\u987b\u57fa\u4e8e\u524d\u8005\u624d\u80fd\u751f\u6548&#xff09;&#xff0c;\u6838\u5fc3\u533a\u522b\u548c\u4f7f\u7528\u903b\u8f91\u5982\u4e0b&#xff0c;\u7ed3\u5408\u4e4b\u524d\u7684\u964d\u96e8\u91cf DataFrame \u5b9e\u4f8b\u8bb2\u89e3\u66f4\u6613\u7406\u89e3\u3002 \u5148\u660e\u786e\u793a\u4f8b\u57fa\u7840","og_url":"https:\/\/www.wsisp.com\/helps\/70590.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-01T20:41:04+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/70590.html","url":"https:\/\/www.wsisp.com\/helps\/70590.html","name":"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-01T20:41:04+00:00","dateModified":"2026-02-01T20:41:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/70590.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/70590.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/70590.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"rainfall \uff1c400 \u548crainfall[rainfall \uff1c400]\u7684\u533a\u522b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/70590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=70590"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/70590\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=70590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=70590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=70590"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=70590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}