{"id":1125252,"date":"2025-01-08T19:50:03","date_gmt":"2025-01-08T11:50:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1125252.html"},"modified":"2025-01-08T19:50:06","modified_gmt":"2025-01-08T11:50:06","slug":"python%e5%a6%82%e4%bd%95%e5%af%b9%e7%bb%8f%e7%ba%ac%e5%ba%a6%e5%9d%90%e6%a0%87%e5%8f%af%e8%a7%86%e5%8c%96","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1125252.html","title":{"rendered":"python\u5982\u4f55\u5bf9\u7ecf\u7eac\u5ea6\u5750\u6807\u53ef\u89c6\u5316"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25090018\/9bfaeffa-fb4e-4a65-8e1a-a525d5c56d81.webp\" alt=\"python\u5982\u4f55\u5bf9\u7ecf\u7eac\u5ea6\u5750\u6807\u53ef\u89c6\u5316\" \/><\/p>\n<p><p> <strong>Python\u5bf9\u7ecf\u7eac\u5ea6\u5750\u6807\u8fdb\u884c\u53ef\u89c6\u5316\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528Matplotlib\u3001Folium\u3001Plotly\u7b49\u5e93\u3002<\/strong>\u5176\u4e2d\uff0cFolium\u53ef\u4ee5\u7528\u6765\u751f\u6210\u4ea4\u4e92\u5f0f\u5730\u56fe\uff0cMatplotlib\u5219\u9002\u5408\u7ed8\u5236\u9759\u6001\u56fe\u8868\uff0c\u800cPlotly\u53ef\u4ee5\u5b9e\u73b0\u9ad8\u7ea7\u7684\u3001\u4ea4\u4e92\u6027\u66f4\u5f3a\u7684\u53ef\u89c6\u5316\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u8fdb\u884c\u53ef\u89c6\u5316\uff0c\u5e76\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Folium\u8fdb\u884c\u5730\u56fe\u53ef\u89c6\u5316\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001MATPLOTLIB\u8fdb\u884c\u9759\u6001\u56fe\u8868\u53ef\u89c6\u5316<\/p>\n<\/p>\n<p><p>Matplotlib\u662fPython\u4e2d\u6700\u5e38\u7528\u7684\u7ed8\u56fe\u5e93\u4e4b\u4e00\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u7ed8\u5236\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\uff0c\u5305\u62ec\u5730\u7406\u5750\u6807\u56fe\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u5b89\u88c5\u548c\u5bfc\u5165Matplotlib<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5Matplotlib\u5e93\u3002\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install matplotlib<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u5bfc\u5165\u5fc5\u8981\u7684\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>import numpy as np<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u7ed8\u5236\u57fa\u672c\u7684\u7ecf\u7eac\u5ea6\u56fe\u8868<\/h3>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u7ec4\u7ecf\u7eac\u5ea6\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528Matplotlib\u7ed8\u5236\u6563\u70b9\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u6570\u636e<\/p>\n<p>latitudes = [34.0522, 36.7783, 40.7128]<\/p>\n<p>longitudes = [-118.2437, -119.4179, -74.0060]<\/p>\n<p>plt.scatter(longitudes, latitudes)<\/p>\n<p>plt.title(&#39;Geographical Coordinates&#39;)<\/p>\n<p>plt.xlabel(&#39;Longitude&#39;)<\/p>\n<p>plt.ylabel(&#39;Latitude&#39;)<\/p>\n<p>plt.grid(True)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u6dfb\u52a0\u80cc\u666f\u5730\u56fe<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u4f7f\u5730\u56fe\u66f4\u5177\u89c6\u89c9\u6548\u679c\uff0c\u53ef\u4ee5\u6dfb\u52a0\u80cc\u666f\u5730\u56fe\u3002\u6700\u5e38\u7528\u7684\u80cc\u666f\u5730\u56fe\u5e93\u662fBasemap\u3002\u9996\u5148\u9700\u8981\u5b89\u88c5Basemap\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install basemap<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f7f\u7528Basemap\u7ed8\u5236\u5e26\u6709\u80cc\u666f\u5730\u56fe\u7684\u7ecf\u7eac\u5ea6\u56fe\u8868\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from mpl_toolkits.basemap import Basemap<\/p>\n<h2><strong>\u521b\u5efa\u5730\u56fe<\/strong><\/h2>\n<p>m = Basemap(projection=&#39;merc&#39;,llcrnrlat=-60,urcrnrlat=90,\\<\/p>\n<p>            llcrnrlon=-180,urcrnrlon=180,resolution=&#39;c&#39;)<\/p>\n<h2><strong>\u7ed8\u5236\u6d77\u5cb8\u7ebf\u3001\u56fd\u5bb6\u548c\u57ce\u5e02<\/strong><\/h2>\n<p>m.drawcoastlines()<\/p>\n<p>m.drawcountries()<\/p>\n<p>m.drawmapboundary()<\/p>\n<h2><strong>\u8f6c\u6362\u7ecf\u7eac\u5ea6\u4e3a\u5730\u56fe\u6295\u5f71\u5750\u6807<\/strong><\/h2>\n<p>x, y = m(longitudes, latitudes)<\/p>\n<h2><strong>\u7ed8\u5236\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>m.scatter(x, y, marker=&#39;o&#39;, color=&#39;r&#39;)<\/p>\n<p>plt.title(&#39;Geographical Coordinates with Basemap&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001FOLIUM\u8fdb\u884c\u4ea4\u4e92\u5f0f\u5730\u56fe\u53ef\u89c6\u5316<\/p>\n<\/p>\n<p><p>Folium\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u5e93\uff0c\u53ef\u4ee5\u751f\u6210\u4ea4\u4e92\u5f0f\u5730\u56fe\uff0c\u9002\u5408\u5c55\u793a\u52a8\u6001\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u5b89\u88c5\u548c\u5bfc\u5165Folium<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Folium\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install folium<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u5bfc\u5165Folium\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import folium<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u521b\u5efa\u57fa\u672c\u5730\u56fe<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u4e2d\u5fc3\u4f4d\u7f6e\u5728\u7279\u5b9a\u7ecf\u7eac\u5ea6\u7684\u57fa\u672c\u5730\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u5730\u56fe\u5bf9\u8c61<\/p>\n<p>mymap = folium.Map(location=[34.0522, -118.2437], zoom_start=5)<\/p>\n<h2><strong>\u663e\u793a\u5730\u56fe<\/strong><\/h2>\n<p>mymap.save(&#39;mymap.html&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u6dfb\u52a0\u6807\u8bb0<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u5728\u5730\u56fe\u4e0a\u6dfb\u52a0\u6807\u8bb0\u6765\u8868\u793a\u7279\u5b9a\u7684\u7ecf\u7eac\u5ea6\u4f4d\u7f6e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u6570\u636e<\/p>\n<p>locations = [<\/p>\n<p>    {&#39;lat&#39;: 34.0522, &#39;lon&#39;: -118.2437, &#39;name&#39;: &#39;Los Angeles&#39;},<\/p>\n<p>    {&#39;lat&#39;: 36.7783, &#39;lon&#39;: -119.4179, &#39;name&#39;: &#39;California&#39;},<\/p>\n<p>    {&#39;lat&#39;: 40.7128, &#39;lon&#39;: -74.0060, &#39;name&#39;: &#39;New York&#39;}<\/p>\n<p>]<\/p>\n<h2><strong>\u521b\u5efa\u5730\u56fe\u5bf9\u8c61<\/strong><\/h2>\n<p>mymap = folium.Map(location=[37.7749, -122.4194], zoom_start=5)<\/p>\n<h2><strong>\u6dfb\u52a0\u6807\u8bb0<\/strong><\/h2>\n<p>for location in locations:<\/p>\n<p>    folium.Marker([location[&#39;lat&#39;], location[&#39;lon&#39;]], popup=location[&#39;name&#39;]).add_to(mymap)<\/p>\n<h2><strong>\u4fdd\u5b58\u5730\u56fe<\/strong><\/h2>\n<p>mymap.save(&#39;mymap_with_markers.html&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4\u3001\u6dfb\u52a0\u70ed\u529b\u56fe<\/h3>\n<\/p>\n<p><p>Folium\u8fd8\u53ef\u4ee5\u7528\u6765\u751f\u6210\u70ed\u529b\u56fe\uff0c\u8fd9\u5bf9\u4e8e\u5c55\u793a\u5bc6\u96c6\u6570\u636e\u975e\u5e38\u6709\u7528\u3002\u9700\u8981\u5b89\u88c5<code>folium.plugins<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from folium.plugins import HeatMap<\/p>\n<h2><strong>\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>heat_data = [[34.0522, -118.2437, 1], [36.7783, -119.4179, 2], [40.7128, -74.0060, 3]]<\/p>\n<h2><strong>\u521b\u5efa\u5730\u56fe\u5bf9\u8c61<\/strong><\/h2>\n<p>mymap = folium.Map(location=[37.7749, -122.4194], zoom_start=5)<\/p>\n<h2><strong>\u6dfb\u52a0\u70ed\u529b\u56fe<\/strong><\/h2>\n<p>HeatMap(heat_data).add_to(mymap)<\/p>\n<h2><strong>\u4fdd\u5b58\u5730\u56fe<\/strong><\/h2>\n<p>mymap.save(&#39;heatmap.html&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001PLOTLY\u8fdb\u884c\u9ad8\u7ea7\u4ea4\u4e92\u5f0f\u5730\u56fe\u53ef\u89c6\u5316<\/p>\n<\/p>\n<p><p>Plotly\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u53ef\u89c6\u5316\u5e93\uff0c\u53ef\u4ee5\u751f\u6210\u9ad8\u7ea7\u7684\u3001\u4ea4\u4e92\u6027\u5f3a\u7684\u56fe\u8868\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u5b89\u88c5\u548c\u5bfc\u5165Plotly<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Plotly\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install plotly<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u5bfc\u5165Plotly\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import plotly.express as px<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u7ed8\u5236\u57fa\u672c\u5730\u56fe<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Plotly\u7ed8\u5236\u4e00\u4e2a\u57fa\u672c\u7684\u5730\u7406\u6563\u70b9\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u6570\u636e<\/p>\n<p>data = {<\/p>\n<p>    &#39;lat&#39;: [34.0522, 36.7783, 40.7128],<\/p>\n<p>    &#39;lon&#39;: [-118.2437, -119.4179, -74.0060],<\/p>\n<p>    &#39;city&#39;: [&#39;Los Angeles&#39;, &#39;California&#39;, &#39;New York&#39;]<\/p>\n<p>}<\/p>\n<p>fig = px.scatter_geo(data, lat=&#39;lat&#39;, lon=&#39;lon&#39;, text=&#39;city&#39;, title=&#39;Geographical Coordinates&#39;)<\/p>\n<p>fig.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u7ed8\u5236\u5e26\u6709\u80cc\u666f\u7684\u5730\u56fe<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u5728\u5730\u56fe\u4e0a\u6dfb\u52a0\u80cc\u666f\u56fe\u5c42\uff0c\u4f7f\u5176\u66f4\u5177\u89c6\u89c9\u6548\u679c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig = px.scatter_geo(<\/p>\n<p>    data, lat=&#39;lat&#39;, lon=&#39;lon&#39;, text=&#39;city&#39;, title=&#39;Geographical Coordinates&#39;,<\/p>\n<p>    projection=&#39;natural earth&#39;<\/p>\n<p>)<\/p>\n<p>fig.update_geos(showland=True, landcolor=&#39;lightgray&#39;)<\/p>\n<p>fig.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4\u3001\u7ed8\u5236\u5e26\u6709\u8def\u5f84\u7684\u5730\u56fe<\/h3>\n<\/p>\n<p><p>Plotly\u8fd8\u53ef\u4ee5\u7ed8\u5236\u5e26\u6709\u8def\u5f84\u7684\u5730\u56fe\uff0c\u8fd9\u5bf9\u4e8e\u5c55\u793a\u8def\u7ebf\u975e\u5e38\u6709\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u6570\u636e<\/p>\n<p>path_data = {<\/p>\n<p>    &#39;lat&#39;: [34.0522, 36.7783, 40.7128],<\/p>\n<p>    &#39;lon&#39;: [-118.2437, -119.4179, -74.0060],<\/p>\n<p>    &#39;city&#39;: [&#39;Los Angeles&#39;, &#39;California&#39;, &#39;New York&#39;]<\/p>\n<p>}<\/p>\n<p>fig = px.line_geo(path_data, lat=&#39;lat&#39;, lon=&#39;lon&#39;, text=&#39;city&#39;, title=&#39;Geographical Path&#39;)<\/p>\n<p>fig.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u63a2\u8ba8\u4e86\u5982\u4f55\u4f7f\u7528Python\u4e2d\u7684\u4e0d\u540c\u5e93\u5bf9\u7ecf\u7eac\u5ea6\u5750\u6807\u8fdb\u884c\u53ef\u89c6\u5316\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u8ba8\u8bba\u4e86\u5982\u4f55\u4f7f\u7528Matplotlib\u7ed8\u5236\u9759\u6001\u56fe\u8868\uff0c\u5982\u4f55\u4f7f\u7528Folium\u751f\u6210\u4ea4\u4e92\u5f0f\u5730\u56fe\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528Plotly\u8fdb\u884c\u9ad8\u7ea7\u7684\u3001\u4ea4\u4e92\u6027\u66f4\u5f3a\u7684\u53ef\u89c6\u5316\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u4f60\u7684\u5177\u4f53\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><p><strong>Matplotlib<\/strong>\u9002\u5408\u9700\u8981\u5feb\u901f\u751f\u6210\u9759\u6001\u56fe\u8868\u7684\u573a\u666f\uff0c\u53ef\u4ee5\u8f7b\u677e\u6dfb\u52a0\u5404\u79cd\u56fe\u8868\u5143\u7d20\u5982\u80cc\u666f\u5730\u56fe\u3001\u6807\u8bb0\u7b49\u3002<strong>Folium<\/strong>\u975e\u5e38\u9002\u5408\u9700\u8981\u751f\u6210\u4ea4\u4e92\u5f0f\u5730\u56fe\u7684\u5e94\u7528\uff0c\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6807\u8bb0\u3001\u70ed\u529b\u56fe\u7b49\u65b9\u5f0f\u4f7f\u5730\u56fe\u66f4\u52a0\u751f\u52a8\u3002<strong>Plotly<\/strong>\u5219\u9002\u7528\u4e8e\u9700\u8981\u9ad8\u7ea7\u4ea4\u4e92\u6027\u548c\u7f8e\u89c2\u56fe\u8868\u7684\u573a\u666f\uff0c\u652f\u6301\u591a\u79cd\u6295\u5f71\u65b9\u5f0f\u548c\u56fe\u5c42\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u901a\u8fc7\u8fd9\u7bc7\u6587\u7ae0\uff0c\u4f60\u80fd\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u4f7f\u7528Python\u5bf9\u7ecf\u7eac\u5ea6\u5750\u6807\u8fdb\u884c\u53ef\u89c6\u5316\uff0c\u5e76\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u53ef\u89c6\u5316\u7ecf\u7eac\u5ea6\u5750\u6807\uff1f<\/strong><br \/>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u5e93\u6765\u5e2e\u52a9\u7528\u6237\u53ef\u89c6\u5316\u7ecf\u7eac\u5ea6\u5750\u6807\uff0c\u4f8b\u5982Matplotlib\u3001Seaborn\u548cFolium\u7b49\u3002\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u5408\u9002\u7684\u5e93\uff0c\u6839\u636e\u5750\u6807\u6570\u636e\u751f\u6210\u5730\u56fe\u3001\u6563\u70b9\u56fe\u6216\u70ed\u529b\u56fe\u3002Folium\u5e93\u7279\u522b\u9002\u5408\u4e8e\u521b\u5efa\u4ea4\u4e92\u5f0f\u5730\u56fe\uff0c\u7528\u6237\u53ea\u9700\u7b80\u5355\u5730\u5c06\u7ecf\u7eac\u5ea6\u6570\u636e\u4f20\u9012\u7ed9\u76f8\u5e94\u7684\u51fd\u6570\u5373\u53ef\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9bPython\u5e93\u6765\u5904\u7406\u5730\u7406\u6570\u636e\uff1f<\/strong><br \/>\u9664\u4e86\u5e38\u89c1\u7684\u53ef\u89c6\u5316\u5e93\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u4f7f\u7528Geopandas\u548cShapely\u7b49\u5e93\u6765\u5904\u7406\u548c\u5206\u6790\u5730\u7406\u6570\u636e\u3002Geopandas\u6269\u5c55\u4e86Pandas\u7684\u529f\u80fd\uff0c\u4f7f\u7528\u6237\u80fd\u591f\u8f7b\u677e\u5904\u7406\u5730\u7406\u4fe1\u606f\uff0cShapely\u5219\u4e13\u6ce8\u4e8e\u51e0\u4f55\u5bf9\u8c61\u7684\u64cd\u4f5c\uff0c\u9002\u5408\u8fdb\u884c\u7a7a\u95f4\u5206\u6790\u548c\u8ba1\u7b97\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u7ecf\u7eac\u5ea6\u6570\u636e\u7684\u683c\u5f0f\u95ee\u9898\uff1f<\/strong><br \/>\u7ecf\u7eac\u5ea6\u6570\u636e\u901a\u5e38\u4ee5\u4e0d\u540c\u7684\u683c\u5f0f\u5b58\u5728\uff0c\u6bd4\u5982\u5341\u8fdb\u5236\u5ea6\u548c\u5ea6\u5206\u79d2\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u8f6c\u6362\u8fd9\u4e9b\u683c\u5f0f\uff0c\u4f8b\u5982\u4f7f\u7528Decimal\u6a21\u5757\u6216\u8005\u81ea\u5b9a\u4e49\u51fd\u6570\u8fdb\u884c\u8f6c\u6362\u3002\u6b64\u5916\uff0cPandas\u5e93\u4e5f\u652f\u6301\u6570\u636e\u6e05\u6d17\u548c\u683c\u5f0f\u8f6c\u6362\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7DataFrame\u8f7b\u677e\u5904\u7406\u5404\u79cd\u683c\u5f0f\u7684\u7ecf\u7eac\u5ea6\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5bf9\u7ecf\u7eac\u5ea6\u5750\u6807\u8fdb\u884c\u53ef\u89c6\u5316\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528Matplotlib\u3001Folium\u3001Plotly\u7b49\u5e93\u3002 [&hellip;]","protected":false},"author":3,"featured_media":1125262,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1125252"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1125252"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1125252\/revisions"}],"predecessor-version":[{"id":1125265,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1125252\/revisions\/1125265"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1125262"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1125252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1125252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1125252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}