{"id":942040,"date":"2024-12-26T21:50:47","date_gmt":"2024-12-26T13:50:47","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/942040.html"},"modified":"2024-12-26T21:50:49","modified_gmt":"2024-12-26T13:50:49","slug":"fusion%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/942040.html","title":{"rendered":"fusion\u5982\u4f55\u4f7f\u7528python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25080015\/442e832d-4ccf-4de3-a457-dbfcfcbfa8b9.webp\" alt=\"fusion\u5982\u4f55\u4f7f\u7528python\" \/><\/p>\n<p><p> \u5f00\u5934\u6bb5\u843d:<br \/><strong>Fusion\u5728Python\u4e2d\u7684\u4f7f\u7528\u4e3b\u8981\u5305\u62ec\u6570\u636e\u878d\u5408\u3001\u6a21\u578b\u878d\u5408\u548c\u56fe\u50cf\u878d\u5408\u7b49\u65b9\u9762\uff0c\u901a\u8fc7\u4f7f\u7528\u5e93\u5982Pandas\u3001Scikit-learn\u548cOpenCV\u7b49\u6765\u5b9e\u73b0\u8fd9\u4e9b\u529f\u80fd\u3002<\/strong> \u5176\u4e2d\uff0c\u6570\u636e\u878d\u5408\u5728\u6570\u636e\u79d1\u5b66\u4e2d\u5c24\u4e3a\u5e38\u89c1\uff0c\u5b83\u6d89\u53ca\u5c06\u591a\u4e2a\u6570\u636e\u6e90\u7684\u4fe1\u606f\u5408\u5e76\u6210\u4e00\u4e2a\u66f4\u4e3a\u5168\u9762\u7684\u6570\u636e\u96c6\u3002\u901a\u8fc7\u6570\u636e\u878d\u5408\uff0c\u6570\u636e\u79d1\u5b66\u5bb6\u53ef\u4ee5\u63d0\u9ad8\u6a21\u578b\u7684\u51c6\u786e\u6027\u548c\u9884\u6d4b\u80fd\u529b\u3002\u6570\u636e\u878d\u5408\u7684\u4e00\u4e2a\u5178\u578b\u5e94\u7528\u662f\u5c06\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u548c\u9759\u6001\u6570\u636e\u7ed3\u5408\uff0c\u7528\u4e8e\u9884\u6d4b\u5206\u6790\u3002Python\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5e93\u548c\u5de5\u5177\u6765\u7b80\u5316\u8fd9\u4e00\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u6570\u636e\u878d\u5408<\/p>\n<\/p>\n<p><p>\u6570\u636e\u878d\u5408\u662f\u5c06\u6765\u81ea\u4e0d\u540c\u6765\u6e90\u7684\u6570\u636e\u96c6\u6210\u5230\u5355\u4e00\u7684\u6570\u636e\u96c6\u4e2d\u3002Python\u7684Pandas\u5e93\u662f\u8fdb\u884c\u6570\u636e\u878d\u5408\u7684\u4e3b\u8981\u5de5\u5177\u4e4b\u4e00\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528Pandas\u8fdb\u884c\u6570\u636e\u878d\u5408<\/li>\n<\/ol>\n<p><p>Pandas\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\u6570\u636e\u878d\u5408\uff0c\u5982merge\u3001join\u548cconcat\u3002merge\u51fd\u6570\u7528\u4e8e\u6839\u636e\u4e00\u4e2a\u6216\u591a\u4e2a\u952e\u5c06\u6570\u636e\u6846\u5408\u5e76\u5728\u4e00\u8d77\u3002join\u51fd\u6570\u4e3b\u8981\u7528\u4e8e\u5728\u7d22\u5f15\u4e0a\u8fdb\u884c\u5408\u5e76\uff0c\u800cconcat\u51fd\u6570\u5219\u7528\u4e8e\u6cbf\u7740\u7279\u5b9a\u7684\u8f74\u8fde\u63a5\u6570\u636e\u6846\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u521b\u5efa\u4e24\u4e2a\u6570\u636e\u6846<\/strong><\/h2>\n<p>df1 = pd.DataFrame({&#39;key&#39;: [&#39;A&#39;, &#39;B&#39;, &#39;C&#39;], &#39;value1&#39;: [1, 2, 3]})<\/p>\n<p>df2 = pd.DataFrame({&#39;key&#39;: [&#39;A&#39;, &#39;B&#39;, &#39;D&#39;], &#39;value2&#39;: [4, 5, 6]})<\/p>\n<h2><strong>\u4f7f\u7528merge\u8fdb\u884c\u878d\u5408<\/strong><\/h2>\n<p>merged_df = pd.merge(df1, df2, on=&#39;key&#39;, how=&#39;inner&#39;)<\/p>\n<p>print(merged_df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5904\u7406\u65f6\u95f4\u5e8f\u5217\u6570\u636e<\/li>\n<\/ol>\n<p><p>\u5728\u6570\u636e\u878d\u5408\u4e2d\uff0c\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u5904\u7406\u662f\u4e00\u9879\u5e38\u89c1\u4efb\u52a1\u3002Pandas\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u652f\u6301\u6765\u5904\u7406\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u5305\u62ec\u91cd\u91c7\u6837\u548c\u65f6\u95f4\u5bf9\u9f50\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u65f6\u95f4\u5e8f\u5217\u6570\u636e<\/p>\n<p>times = pd.date_range(&#39;2023-01-01&#39;, periods=5, freq=&#39;D&#39;)<\/p>\n<p>df3 = pd.DataFrame({&#39;time&#39;: times, &#39;value&#39;: [10, 20, 30, 40, 50]})<\/p>\n<h2><strong>\u8bbe\u7f6e\u65f6\u95f4\u5217\u4e3a\u7d22\u5f15<\/strong><\/h2>\n<p>df3.set_index(&#39;time&#39;, inplace=True)<\/p>\n<h2><strong>\u91cd\u91c7\u6837\u4e3a\u6bcf\u4e24\u5929\u7684\u5e73\u5747\u503c<\/strong><\/h2>\n<p>resampled_df = df3.resample(&#39;2D&#39;).mean()<\/p>\n<p>print(resampled_df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u6a21\u578b\u878d\u5408<\/p>\n<\/p>\n<p><p>\u6a21\u578b\u878d\u5408\u662f\u901a\u8fc7\u7ec4\u5408\u591a\u4e2a\u6a21\u578b\u7684\u9884\u6d4b\u7ed3\u679c\u6765\u63d0\u9ad8\u6574\u4f53\u6027\u80fd\u7684\u6280\u672f\u3002Scikit-learn\u63d0\u4f9b\u4e86\u4e00\u4e9b\u7b80\u5355\u800c\u6709\u6548\u7684\u6a21\u578b\u878d\u5408\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<ol>\n<li>\u6295\u7968\u5206\u7c7b\u5668<\/li>\n<\/ol>\n<p><p>\u6295\u7968\u5206\u7c7b\u5668\u662f\u4e00\u79cd\u7b80\u5355\u7684\u6a21\u578b\u878d\u5408\u65b9\u6cd5\uff0c\u5b83\u901a\u8fc7\u5bf9\u591a\u4e2a\u6a21\u578b\u7684\u9884\u6d4b\u7ed3\u679c\u8fdb\u884c\u6295\u7968\u6765\u51b3\u5b9a\u6700\u7ec8\u7684\u9884\u6d4b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.datasets import load_iris<\/p>\n<p>from sklearn.model_selection import tr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n_test_split<\/p>\n<p>from sklearn.ensemble import VotingClassifier<\/p>\n<p>from sklearn.linear_model import LogisticRegression<\/p>\n<p>from sklearn.tree import DecisionTreeClassifier<\/p>\n<p>from sklearn.svm import SVC<\/p>\n<h2><strong>\u52a0\u8f7d\u6570\u636e\u96c6\u5e76\u62c6\u5206<\/strong><\/h2>\n<p>iris = load_iris()<\/p>\n<p>X_train, X_test, y_train, y_test = train_test_split(iris.data, iris.target, test_size=0.2, random_state=42)<\/p>\n<h2><strong>\u521b\u5efa\u6a21\u578b<\/strong><\/h2>\n<p>clf1 = LogisticRegression(max_iter=1000)<\/p>\n<p>clf2 = DecisionTreeClassifier()<\/p>\n<p>clf3 = SVC(probability=True)<\/p>\n<h2><strong>\u521b\u5efa\u6295\u7968\u5206\u7c7b\u5668<\/strong><\/h2>\n<p>voting_clf = VotingClassifier(estimators=[(&#39;lr&#39;, clf1), (&#39;dt&#39;, clf2), (&#39;svc&#39;, clf3)], voting=&#39;hard&#39;)<\/p>\n<h2><strong>\u8bad\u7ec3\u548c\u8bc4\u4f30<\/strong><\/h2>\n<p>voting_clf.fit(X_train, y_train)<\/p>\n<p>accuracy = voting_clf.score(X_test, y_test)<\/p>\n<p>print(f&#39;Voting Classifier Accuracy: {accuracy}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5806\u53e0\u6a21\u578b<\/li>\n<\/ol>\n<p><p>\u5806\u53e0\u6a21\u578b\u662f\u4e00\u79cd\u66f4\u590d\u6742\u7684\u6a21\u578b\u878d\u5408\u65b9\u6cd5\uff0c\u5b83\u901a\u8fc7\u8bad\u7ec3\u4e00\u4e2a\u5143\u6a21\u578b\u6765\u7ed3\u5408\u57fa\u7840\u6a21\u578b\u7684\u9884\u6d4b\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.ensemble import StackingClassifier<\/p>\n<p>from sklearn.naive_bayes import GaussianNB<\/p>\n<h2><strong>\u521b\u5efa\u57fa\u7840\u6a21\u578b<\/strong><\/h2>\n<p>base_learners = [<\/p>\n<p>    (&#39;lr&#39;, LogisticRegression(max_iter=1000)),<\/p>\n<p>    (&#39;dt&#39;, DecisionTreeClassifier())<\/p>\n<p>]<\/p>\n<h2><strong>\u521b\u5efa\u5806\u53e0\u6a21\u578b<\/strong><\/h2>\n<p>stacking_clf = StackingClassifier(estimators=base_learners, final_estimator=GaussianNB())<\/p>\n<h2><strong>\u8bad\u7ec3\u548c\u8bc4\u4f30<\/strong><\/h2>\n<p>stacking_clf.fit(X_train, y_train)<\/p>\n<p>stacking_accuracy = stacking_clf.score(X_test, y_test)<\/p>\n<p>print(f&#39;Stacking Classifier Accuracy: {stacking_accuracy}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u56fe\u50cf\u878d\u5408<\/p>\n<\/p>\n<p><p>\u56fe\u50cf\u878d\u5408\u662f\u5c06\u591a\u5e45\u56fe\u50cf\u5408\u6210\u4e3a\u4e00\u5e45\u56fe\u50cf\u7684\u8fc7\u7a0b\uff0c\u901a\u5e38\u7528\u4e8e\u56fe\u50cf\u5904\u7406\u548c\u8ba1\u7b97\u673a\u89c6\u89c9\u3002OpenCV\u662fPython\u4e2d\u8fdb\u884c\u56fe\u50cf\u5904\u7406\u7684\u5f3a\u5927\u5e93\u3002<\/p>\n<\/p>\n<ol>\n<li>\u56fe\u50cf\u6df7\u5408<\/li>\n<\/ol>\n<p><p>OpenCV\u4e2d\u7684addWeighted\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u5c06\u4e24\u5e45\u56fe\u50cf\u6df7\u5408\u5728\u4e00\u8d77\uff0c\u8fd9\u5728\u56fe\u50cf\u589e\u5f3a\u548c\u53e0\u52a0\u6548\u679c\u4e2d\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<h2><strong>\u8bfb\u53d6\u56fe\u50cf<\/strong><\/h2>\n<p>img1 = cv2.imread(&#39;image1.jpg&#39;)<\/p>\n<p>img2 = cv2.imread(&#39;image2.jpg&#39;)<\/p>\n<h2><strong>\u6df7\u5408\u56fe\u50cf<\/strong><\/h2>\n<p>blended_img = cv2.addWeighted(img1, 0.7, img2, 0.3, 0)<\/p>\n<h2><strong>\u663e\u793a\u7ed3\u679c<\/strong><\/h2>\n<p>cv2.imshow(&#39;Blended Image&#39;, blended_img)<\/p>\n<p>cv2.waitKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u591a\u5c3a\u5ea6\u878d\u5408<\/li>\n<\/ol>\n<p><p>\u591a\u5c3a\u5ea6\u878d\u5408\u662f\u4e00\u79cd\u66f4\u590d\u6742\u7684\u56fe\u50cf\u878d\u5408\u65b9\u6cd5\uff0c\u901a\u8fc7\u5728\u4e0d\u540c\u5c3a\u5ea6\u4e0a\u878d\u5408\u56fe\u50cf\u7ec6\u8282\u6765\u63d0\u9ad8\u56fe\u50cf\u8d28\u91cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u56fe\u50cf\u91d1\u5b57\u5854<\/strong><\/h2>\n<p>def create_pyramid(image, levels):<\/p>\n<p>    pyramid = [image]<\/p>\n<p>    for i in range(levels):<\/p>\n<p>        image = cv2.pyrDown(image)<\/p>\n<p>        pyramid.append(image)<\/p>\n<p>    return pyramid<\/p>\n<h2><strong>\u878d\u5408\u91d1\u5b57\u5854<\/strong><\/h2>\n<p>def blend_pyramids(pyr1, pyr2):<\/p>\n<p>    blended_pyr = []<\/p>\n<p>    for level1, level2 in zip(pyr1, pyr2):<\/p>\n<p>        rows, cols, dpt = level1.shape<\/p>\n<p>        blended_pyr.append(np.hstack((level1[:, :cols\/\/2], level2[:, cols\/\/2:])))<\/p>\n<p>    return blended_pyr<\/p>\n<h2><strong>\u91cd\u5efa\u56fe\u50cf<\/strong><\/h2>\n<p>def reconstruct_from_pyramid(pyramid):<\/p>\n<p>    image = pyramid[-1]<\/p>\n<p>    for level in reversed(pyramid[:-1]):<\/p>\n<p>        image = cv2.pyrUp(image)<\/p>\n<p>        image = cv2.add(image, level)<\/p>\n<p>    return image<\/p>\n<h2><strong>\u5e94\u7528\u591a\u5c3a\u5ea6\u878d\u5408<\/strong><\/h2>\n<p>pyr1 = create_pyramid(img1, 3)<\/p>\n<p>pyr2 = create_pyramid(img2, 3)<\/p>\n<p>blended_pyr = blend_pyramids(pyr1, pyr2)<\/p>\n<p>final_image = reconstruct_from_pyramid(blended_pyr)<\/p>\n<h2><strong>\u663e\u793a\u7ed3\u679c<\/strong><\/h2>\n<p>cv2.imshow(&#39;Multiscale Blended Image&#39;, final_image)<\/p>\n<p>cv2.waitKey(0)<\/p>\n<p>cv2.destroyAllWindows()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u878d\u5408\u6280\u672f\u7684\u5e94\u7528<\/p>\n<\/p>\n<p><p>\u878d\u5408\u6280\u672f\u5728\u591a\u4e2a\u9886\u57df\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5305\u62ec\u6570\u636e\u79d1\u5b66\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u548c\u8ba1\u7b97\u673a\u89c6\u89c9\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\u6570\u636e\u79d1\u5b66\u4e2d\u7684\u5e94\u7528<\/li>\n<\/ol>\n<p><p>\u5728\u6570\u636e\u79d1\u5b66\u4e2d\uff0c\u6570\u636e\u878d\u5408\u6280\u672f\u88ab\u5e7f\u6cdb\u7528\u4e8e\u6570\u636e\u6e05\u6d17\u548c\u7279\u5f81\u5de5\u7a0b\u3002\u901a\u8fc7\u5c06\u591a\u6e90\u6570\u636e\u7ed3\u5408\uff0c\u6570\u636e\u79d1\u5b66\u5bb6\u80fd\u591f\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\uff0c\u63d0\u5347\u6a21\u578b\u7684\u9884\u6d4b\u80fd\u529b\u3002\u4f8b\u5982\uff0c\u5c06\u7528\u6237\u7684\u793e\u4ea4\u5a92\u4f53\u6570\u636e\u4e0e\u8d2d\u4e70\u8bb0\u5f55\u7ed3\u5408\uff0c\u8fdb\u884c\u7528\u6237\u884c\u4e3a\u9884\u6d4b\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u533b\u5b66\u56fe\u50cf\u4e2d\u7684\u5e94\u7528<\/li>\n<\/ol>\n<p><p>\u5728\u533b\u5b66\u56fe\u50cf\u5904\u7406\u4e2d\uff0c\u56fe\u50cf\u878d\u5408\u6280\u672f\u7528\u4e8e\u5408\u5e76\u4e0d\u540c\u6a21\u6001\u7684\u56fe\u50cf\uff0c\u5982CT\u548cMRI\uff0c\u4ee5\u63d0\u4f9b\u66f4\u5168\u9762\u7684\u75c5\u53d8\u4fe1\u606f\u3002\u8fd9\u79cd\u6280\u672f\u6709\u52a9\u4e8e\u533b\u751f\u66f4\u51c6\u786e\u5730\u8fdb\u884c\u8bca\u65ad\u548c\u6cbb\u7597\u89c4\u5212\u3002<\/p>\n<\/p>\n<p><p>\u603b\u4e4b\uff0cPython\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5de5\u5177\u548c\u5e93\u6765\u652f\u6301\u5404\u79cd\u7c7b\u578b\u7684\u878d\u5408\u6280\u672f\u5e94\u7528\u3002\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\uff0c\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u548c\u5de5\u5177\uff0c\u80fd\u591f\u663e\u8457\u63d0\u5347\u5de5\u4f5c\u7684\u6548\u7387\u548c\u6210\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b89\u88c5Fusion\u5e93\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u4f7f\u7528Fusion\u5e93\uff0c\u60a8\u9700\u8981\u9996\u5148\u786e\u4fdd\u5b89\u88c5\u4e86\u8be5\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7Python\u7684\u5305\u7ba1\u7406\u5de5\u5177pip\u8fdb\u884c\u5b89\u88c5\u3002\u6253\u5f00\u547d\u4ee4\u884c\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<code>pip install fusion<\/code>\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u7279\u5b9a\u7684\u865a\u62df\u73af\u5883\uff0c\u8bf7\u786e\u4fdd\u5728\u8be5\u73af\u5883\u4e2d\u8fd0\u884c\u6b64\u547d\u4ee4\u3002<\/p>\n<p><strong>Fusion\u5e93\u7684\u4e3b\u8981\u529f\u80fd\u6709\u54ea\u4e9b\uff1f<\/strong><br \/>Fusion\u5e93\u63d0\u4f9b\u4e86\u591a\u79cd\u529f\u80fd\uff0c\u5305\u62ec\u6570\u636e\u5904\u7406\u3001\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u6784\u5efa\u548c\u8bc4\u4f30\u3001\u4ee5\u53ca\u9ad8\u6548\u7684\u53ef\u89c6\u5316\u5de5\u5177\u3002\u5b83\u4f7f\u7528\u6237\u80fd\u591f\u8f7b\u677e\u5730\u5904\u7406\u590d\u6742\u7684\u6570\u636e\u96c6\uff0c\u5e76\u5b9e\u73b0\u6570\u636e\u5206\u6790\u4e0e\u9884\u6d4b\u6a21\u578b\u7684\u5feb\u901f\u5f00\u53d1\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u4f7f\u7528Fusion\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316\u7684\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u4f7f\u7528Fusion\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316\u4e00\u822c\u5305\u62ec\u51e0\u4e2a\u6b65\u9aa4\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u5bfc\u5165Fusion\u5e93\u53ca\u76f8\u5173\u6a21\u5757\u3002\u63a5\u7740\uff0c\u52a0\u8f7d\u60a8\u7684\u6570\u636e\u96c6\u5e76\u8fdb\u884c\u5fc5\u8981\u7684\u6570\u636e\u9884\u5904\u7406\u3002\u7136\u540e\uff0c\u4f7f\u7528Fusion\u63d0\u4f9b\u7684\u53ef\u89c6\u5316\u51fd\u6570\u521b\u5efa\u56fe\u8868\u6216\u56fe\u5f62\uff0c\u6700\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528\u663e\u793a\u51fd\u6570\u6765\u5448\u73b0\u7ed3\u679c\u3002\u5177\u4f53\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import fusion as f\ndata = f.load_data(&#39;data.csv&#39;)\nvisual = f.create_visual(data)\nf.show(visual)\n<\/code><\/pre>\n<p>\u6b64\u4ee3\u7801\u6bb5\u6f14\u793a\u4e86\u5982\u4f55\u52a0\u8f7d\u6570\u636e\u5e76\u521b\u5efa\u53ef\u89c6\u5316\uff0c\u5177\u4f53\u5b9e\u73b0\u53ef\u80fd\u4f1a\u6839\u636e\u60a8\u7684\u6570\u636e\u548c\u9700\u6c42\u800c\u6709\u6240\u4e0d\u540c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f00\u5934\u6bb5\u843d:Fusion\u5728Python\u4e2d\u7684\u4f7f\u7528\u4e3b\u8981\u5305\u62ec\u6570\u636e\u878d\u5408\u3001\u6a21\u578b\u878d\u5408\u548c\u56fe\u50cf\u878d\u5408\u7b49\u65b9\u9762\uff0c\u901a\u8fc7\u4f7f\u7528\u5e93\u5982Panda [&hellip;]","protected":false},"author":3,"featured_media":942043,"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\/942040"}],"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=942040"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/942040\/revisions"}],"predecessor-version":[{"id":942046,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/942040\/revisions\/942046"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/942043"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=942040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=942040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=942040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}