{"id":932365,"date":"2024-12-26T17:56:48","date_gmt":"2024-12-26T09:56:48","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/932365.html"},"modified":"2024-12-26T17:56:51","modified_gmt":"2024-12-26T09:56:51","slug":"python-%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98%e7%89%b9%e5%be%81","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/932365.html","title":{"rendered":"python \u5982\u4f55\u4fdd\u5b58\u7279\u5f81"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25070251\/8f96ce6d-4f85-45fd-a918-aea926ba3fc3.webp\" alt=\"python \u5982\u4f55\u4fdd\u5b58\u7279\u5f81\" \/><\/p>\n<p><p> <strong>Python\u4fdd\u5b58\u7279\u5f81\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528pickle\u6a21\u5757\u4fdd\u5b58\u4e3a\u6587\u4ef6\u3001\u4f7f\u7528joblib\u6a21\u5757\u8fdb\u884c\u538b\u7f29\u5b58\u50a8\u3001\u5c06\u7279\u5f81\u5b58\u5165\u6570\u636e\u5e93\u3001\u4fdd\u5b58\u4e3aCSV\u6216Excel\u6587\u4ef6\u3001\u5c06\u7279\u5f81\u4fdd\u5b58\u4e3aNumPy\u6570\u7ec4\u7b49\u3002<\/strong>\u5176\u4e2d\uff0c\u4f7f\u7528pickle\u6a21\u5757\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u80fd\u591f\u5e8f\u5217\u5316\u51e0\u4e4e\u6240\u6709Python\u5bf9\u8c61\uff0c\u5e76\u4e14\u4f7f\u7528\u7b80\u5355\u65b9\u4fbf\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528pickle\u6a21\u5757\u4fdd\u5b58\u7279\u5f81\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528PICKLE\u6a21\u5757<\/h3>\n<\/p>\n<p><h4>1\u3001\u4ec0\u4e48\u662fPickle\u6a21\u5757<\/h4>\n<\/p>\n<p><p>Pickle\u662fPython\u7684\u4e00\u4e2a\u5185\u7f6e\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u65b9\u5f0f\u6765\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316Python\u5bf9\u8c61\u3002\u5e8f\u5217\u5316\u662f\u6307\u5c06Python\u5bf9\u8c61\u8f6c\u6362\u4e3a\u4e00\u4e2a\u5b57\u8282\u6d41\uff0c\u4ee5\u4fbf\u80fd\u591f\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u6216\u901a\u8fc7\u7f51\u7edc\u8fdb\u884c\u4f20\u8f93\u3002\u53cd\u5e8f\u5217\u5316\u5219\u662f\u5c06\u5b57\u8282\u6d41\u91cd\u65b0\u8f6c\u6362\u4e3aPython\u5bf9\u8c61\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528Pickle\u4fdd\u5b58\u7279\u5f81<\/h4>\n<\/p>\n<p><p>\u8981\u4f7f\u7528Pickle\u4fdd\u5b58\u7279\u5f81\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u5c06\u7279\u5f81\u6570\u636e\u8f6c\u6362\u4e3aPython\u5bf9\u8c61\uff08\u5982\u5217\u8868\u3001\u5b57\u5178\u3001NumPy\u6570\u7ec4\u7b49\uff09\uff0c\u7136\u540e\u4f7f\u7528Pickle\u7684<code>dump<\/code>\u51fd\u6570\u5c06\u5bf9\u8c61\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pickle<\/p>\n<h2><strong>\u5047\u8bbe\u6709\u4e00\u4e2a\u7279\u5f81\u5b57\u5178<\/strong><\/h2>\n<p>features = {&#39;feature1&#39;: [1, 2, 3], &#39;feature2&#39;: [4, 5, 6]}<\/p>\n<h2><strong>\u5c06\u7279\u5f81\u4fdd\u5b58\u5230\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;features.pkl&#39;, &#39;wb&#39;) as f:<\/p>\n<p>    pickle.dump(features, f)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u8bfb\u53d6Pickle\u6587\u4ef6\u4e2d\u7684\u7279\u5f81<\/h4>\n<\/p>\n<p><p>\u8981\u8bfb\u53d6Pickle\u6587\u4ef6\u4e2d\u7684\u7279\u5f81\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Pickle\u7684<code>load<\/code>\u51fd\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;features.pkl&#39;, &#39;rb&#39;) as f:<\/p>\n<p>    loaded_features = pickle.load(f)<\/p>\n<p>print(loaded_features)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528JOBLIB\u6a21\u5757<\/h3>\n<\/p>\n<p><h4>1\u3001\u4ec0\u4e48\u662fJoblib\u6a21\u5757<\/h4>\n<\/p>\n<p><p>Joblib\u662f\u4e00\u4e2a\u7528\u4e8ePython\u7684\u8f7b\u91cf\u7ea7\u5e76\u884c\u8ba1\u7b97\u548c\u6301\u4e45\u5316\u5e93\u3002\u4e0ePickle\u76f8\u6bd4\uff0cJoblib\u66f4\u9002\u5408\u7528\u4e8e\u5b58\u50a8\u5927\u578b\u6570\u636e\uff0c\u56e0\u4e3a\u5b83\u80fd\u591f\u9ad8\u6548\u5730\u538b\u7f29\u548c\u5b58\u50a8\u5927\u89c4\u6a21\u7684NumPy\u6570\u7ec4\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528Joblib\u4fdd\u5b58\u7279\u5f81<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528Joblib\u4fdd\u5b58\u7279\u5f81\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u4f7f\u7528<code>joblib.dump<\/code>\u51fd\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from joblib import dump, load<\/p>\n<h2><strong>\u5047\u8bbe\u6709\u4e00\u4e2a\u7279\u5f81\u5b57\u5178<\/strong><\/h2>\n<p>features = {&#39;feature1&#39;: [1, 2, 3], &#39;feature2&#39;: [4, 5, 6]}<\/p>\n<h2><strong>\u5c06\u7279\u5f81\u4fdd\u5b58\u5230\u6587\u4ef6<\/strong><\/h2>\n<p>dump(features, &#39;features.joblib&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u8bfb\u53d6Joblib\u6587\u4ef6\u4e2d\u7684\u7279\u5f81<\/h4>\n<\/p>\n<p><p>\u540c\u6837\uff0c\u53ef\u4ee5\u4f7f\u7528<code>joblib.load<\/code>\u51fd\u6570\u6765\u8bfb\u53d6\u7279\u5f81\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">loaded_features = load(&#39;features.joblib&#39;)<\/p>\n<p>print(loaded_features)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4fdd\u5b58\u4e3aCSV\u6216EXCEL\u6587\u4ef6<\/h3>\n<\/p>\n<p><h4>1\u3001\u4ec0\u4e48\u662fCSV\u548cExcel\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>CSV\uff08Comma-Separated Values\uff09\u548cExcel\u6587\u4ef6\u90fd\u662f\u5e38\u7528\u7684\u6570\u636e\u5b58\u50a8\u683c\u5f0f\u3002CSV\u6587\u4ef6\u662f\u4e00\u79cd\u7eaf\u6587\u672c\u683c\u5f0f\uff0c\u7528\u4e8e\u5b58\u50a8\u8868\u683c\u6570\u636e\uff0c\u800cExcel\u6587\u4ef6\u5219\u662fMicrosoft Excel\u4f7f\u7528\u7684\u4e13\u6709\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528Pandas\u4fdd\u5b58\u7279\u5f81\u4e3aCSV\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>Pandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u5e93\uff0c\u63d0\u4f9b\u4e86\u5c06DataFrame\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\u7684\u529f\u80fd\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u5047\u8bbe\u6709\u4e00\u4e2a\u7279\u5f81DataFrame<\/strong><\/h2>\n<p>features_df = pd.DataFrame({&#39;feature1&#39;: [1, 2, 3], &#39;feature2&#39;: [4, 5, 6]})<\/p>\n<h2><strong>\u5c06\u7279\u5f81\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6<\/strong><\/h2>\n<p>features_df.to_csv(&#39;features.csv&#39;, index=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u4f7f\u7528Pandas\u4fdd\u5b58\u7279\u5f81\u4e3aExcel\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>Pandas\u540c\u6837\u652f\u6301\u5c06DataFrame\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u7279\u5f81\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6<\/p>\n<p>features_df.to_excel(&#39;features.xlsx&#39;, index=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5c06\u7279\u5f81\u5b58\u5165\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u5c06\u7279\u5f81\u5b58\u5165SQL\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u5e93\u7528\u4e8e\u4e0eSQL\u6570\u636e\u5e93\u4ea4\u4e92\uff0c\u5982SQLite\u3001MySQL\u3001PostgreSQL\u7b49\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528SQLite\u5c06\u7279\u5f81\u5b58\u5165\u6570\u636e\u5e93\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sqlite3<\/p>\n<h2><strong>\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/h2>\n<p>conn = sqlite3.connect(&#39;features.db&#39;)<\/p>\n<p>c = conn.cursor()<\/p>\n<h2><strong>\u521b\u5efa\u7279\u5f81\u8868<\/strong><\/h2>\n<p>c.execute(&#39;&#39;&#39;CREATE TABLE IF NOT EXISTS features<\/p>\n<p>             (feature1 INTEGER, feature2 INTEGER)&#39;&#39;&#39;)<\/p>\n<h2><strong>\u63d2\u5165\u7279\u5f81\u6570\u636e<\/strong><\/h2>\n<p>features = [(1, 4), (2, 5), (3, 6)]<\/p>\n<p>c.executemany(&#39;INSERT INTO features VALUES (?, ?)&#39;, features)<\/p>\n<h2><strong>\u63d0\u4ea4\u5e76\u5173\u95ed\u8fde\u63a5<\/strong><\/h2>\n<p>conn.commit()<\/p>\n<p>conn.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u5c06\u7279\u5f81\u5b58\u5165NoSQL\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><p>NoSQL\u6570\u636e\u5e93\u5982MongoDB\u3001Cassandra\u7b49\u4e5f\u5e7f\u6cdb\u7528\u4e8e\u5b58\u50a8\u5927\u89c4\u6a21\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u5c06\u7279\u5f81\u5b58\u5165MongoDB\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pymongo import MongoClient<\/p>\n<h2><strong>\u521b\u5efaMongoDB\u8fde\u63a5<\/strong><\/h2>\n<p>client = MongoClient(&#39;localhost&#39;, 27017)<\/p>\n<p>db = client[&#39;feature_db&#39;]<\/p>\n<p>collection = db[&#39;features&#39;]<\/p>\n<h2><strong>\u63d2\u5165\u7279\u5f81\u6570\u636e<\/strong><\/h2>\n<p>features = [{&#39;feature1&#39;: 1, &#39;feature2&#39;: 4},<\/p>\n<p>            {&#39;feature1&#39;: 2, &#39;feature2&#39;: 5},<\/p>\n<p>            {&#39;feature1&#39;: 3, &#39;feature2&#39;: 6}]<\/p>\n<p>collection.insert_many(features)<\/p>\n<h2><strong>\u5173\u95ed\u8fde\u63a5<\/strong><\/h2>\n<p>client.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4fdd\u5b58\u4e3aNUMPY\u6570\u7ec4<\/h3>\n<\/p>\n<p><h4>1\u3001\u4ec0\u4e48\u662fNumPy\u6570\u7ec4<\/h4>\n<\/p>\n<p><p>NumPy\u662fPython\u7684\u4e00\u4e2a\u79d1\u5b66\u8ba1\u7b97\u5e93\uff0c\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u591a\u7ef4\u6570\u7ec4\u5bf9\u8c61\u2014\u2014ndarray\u3002NumPy\u6570\u7ec4\u662f\u4e00\u79cd\u5185\u5b58\u8282\u7701\u3001\u9ad8\u6548\u7684\u5b58\u50a8\u65b9\u5f0f\uff0c\u9002\u5408\u7528\u4e8e\u5927\u89c4\u6a21\u6570\u503c\u8ba1\u7b97\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528NumPy\u4fdd\u5b58\u7279\u5f81<\/h4>\n<\/p>\n<p><p>NumPy\u63d0\u4f9b\u4e86\u5c06\u6570\u7ec4\u4fdd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u6587\u4ef6\u548c\u6587\u672c\u6587\u4ef6\u7684\u529f\u80fd\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u5047\u8bbe\u6709\u4e00\u4e2a\u7279\u5f81\u6570\u7ec4<\/strong><\/h2>\n<p>features = np.array([[1, 4], [2, 5], [3, 6]])<\/p>\n<h2><strong>\u5c06\u7279\u5f81\u4fdd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u6587\u4ef6<\/strong><\/h2>\n<p>np.save(&#39;features.npy&#39;, features)<\/p>\n<h2><strong>\u5c06\u7279\u5f81\u4fdd\u5b58\u4e3a\u6587\u672c\u6587\u4ef6<\/strong><\/h2>\n<p>np.savetxt(&#39;features.txt&#39;, features, fmt=&#39;%d&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u8bfb\u53d6NumPy\u6587\u4ef6\u4e2d\u7684\u7279\u5f81<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>np.load<\/code>\u548c<code>np.loadtxt<\/code>\u51fd\u6570\u6765\u8bfb\u53d6\u7279\u5f81\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n<p>loaded_features = np.load(&#39;features.npy&#39;)<\/p>\n<p>print(loaded_features)<\/p>\n<h2><strong>\u8bfb\u53d6\u6587\u672c\u6587\u4ef6<\/strong><\/h2>\n<p>loaded_features_txt = np.loadtxt(&#39;features.txt&#39;, dtype=int)<\/p>\n<p>print(loaded_features_txt)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u9009\u62e9\u5408\u9002\u7684\u7279\u5f81\u4fdd\u5b58\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u9009\u62e9\u7279\u5f81\u4fdd\u5b58\u65b9\u6cd5\u65f6\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u8fdb\u884c\u9009\u62e9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>Pickle\u6a21\u5757<\/strong>\uff1a\u9002\u5408\u5b58\u50a8\u8f83\u5c0f\u7684Python\u5bf9\u8c61\uff0c\u5e8f\u5217\u5316\u901f\u5ea6\u8f83\u5feb\uff0c\u4f46\u4e0d\u5177\u5907\u538b\u7f29\u529f\u80fd\u3002<\/li>\n<li><strong>Joblib\u6a21\u5757<\/strong>\uff1a\u9002\u5408\u5b58\u50a8\u5927\u578bNumPy\u6570\u7ec4\uff0c\u5177\u5907\u538b\u7f29\u529f\u80fd\u3002<\/li>\n<li><strong>CSV\/Excel\u6587\u4ef6<\/strong>\uff1a\u9002\u5408\u5b58\u50a8\u8868\u683c\u6570\u636e\uff0c\u4fbf\u4e8e\u6570\u636e\u5171\u4eab\u548c\u53ef\u89c6\u5316\u3002<\/li>\n<li><strong>SQL\/NoSQL\u6570\u636e\u5e93<\/strong>\uff1a\u9002\u5408\u5b58\u50a8\u548c\u67e5\u8be2\u5927\u89c4\u6a21\u6570\u636e\uff0c\u652f\u6301\u5e76\u53d1\u8bbf\u95ee\u3002<\/li>\n<li><strong>NumPy\u6570\u7ec4<\/strong>\uff1a\u9002\u5408\u5b58\u50a8\u6570\u503c\u6570\u636e\uff0c\u8ba1\u7b97\u6548\u7387\u9ad8\u3002<\/li>\n<\/ul>\n<p><h3>\u4e03\u3001\u6ce8\u610f\u4e8b\u9879<\/h3>\n<\/p>\n<ul>\n<li><strong>\u6570\u636e\u5b89\u5168<\/strong>\uff1a\u5728\u4fdd\u5b58\u7279\u5f81\u65f6\uff0c\u5c24\u5176\u662f\u4f7f\u7528\u6570\u636e\u5e93\u5b58\u50a8\u65f6\uff0c\u9700\u8981\u786e\u4fdd\u6570\u636e\u7684\u5b89\u5168\u6027\uff0c\u9632\u6b62\u6570\u636e\u6cc4\u9732\u3002<\/li>\n<li><strong>\u6570\u636e\u4e00\u81f4\u6027<\/strong>\uff1a\u786e\u4fdd\u5728\u4fdd\u5b58\u548c\u8bfb\u53d6\u7279\u5f81\u65f6\uff0c\u6570\u636e\u683c\u5f0f\u548c\u7c7b\u578b\u7684\u4e00\u81f4\u6027\u3002<\/li>\n<li><strong>\u6027\u80fd\u8003\u8651<\/strong>\uff1a\u5728\u5927\u89c4\u6a21\u6570\u636e\u5b58\u50a8\u65f6\uff0c\u9700\u8981\u8003\u8651\u5b58\u50a8\u548c\u8bfb\u53d6\u7684\u6027\u80fd\uff0c\u9009\u62e9\u5408\u9002\u7684\u538b\u7f29\u548c\u5b58\u50a8\u65b9\u6cd5\u3002<\/li>\n<li><strong>\u6570\u636e\u5907\u4efd<\/strong>\uff1a\u5b9a\u671f\u5907\u4efd\u7279\u5f81\u6570\u636e\uff0c\u9632\u6b62\u6570\u636e\u4e22\u5931\u3002<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u4ecb\u7ecd\uff0c\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u7279\u5f81\u4fdd\u5b58\u65b9\u6cd5\uff0c\u4ee5\u4fbf\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u9ad8\u6548\u5730\u7ba1\u7406\u548c\u5229\u7528\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4fdd\u5b58<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6a21\u578b\u7684\u7279\u5f81\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\u4fdd\u5b58\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u7279\u5f81\u3002\u5e38\u7528\u7684\u65b9\u5f0f\u5305\u62ec\u4f7f\u7528<code>pickle<\/code>\u6a21\u5757\u3001<code>joblib<\/code>\u5e93\u548c<code>pandas<\/code>\u7684<code>DataFrame<\/code>\u3002<code>pickle<\/code>\u548c<code>joblib<\/code>\u90fd\u53ef\u4ee5\u5e8f\u5217\u5316Python\u5bf9\u8c61\uff0c\u5c06\u7279\u5f81\u4fdd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u65b9\u4fbf\u540e\u7eed\u52a0\u8f7d\u548c\u4f7f\u7528\u3002\u800c<code>pandas<\/code>\u5219\u53ef\u4ee5\u5c06\u7279\u5f81\u6570\u636e\u4fdd\u5b58\u4e3aCSV\u6216Excel\u6587\u4ef6\uff0c\u4fbf\u4e8e\u6570\u636e\u7684\u67e5\u770b\u548c\u5171\u4eab\u3002\u6839\u636e\u4f60\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u5373\u53ef\u3002<\/p>\n<p><strong>\u4f7f\u7528\u4ec0\u4e48\u5de5\u5177\u53ef\u4ee5\u6709\u6548\u7ba1\u7406\u548c\u4fdd\u5b58\u7279\u5f81\u6570\u636e\uff1f<\/strong><br \/>\u5bf9\u4e8e\u7279\u5f81\u6570\u636e\u7684\u7ba1\u7406\uff0c<code>Featuretools<\/code>\u548c<code>Dask<\/code>\u662f\u4e24\u4e2a\u975e\u5e38\u5b9e\u7528\u7684\u5de5\u5177\u3002<code>Featuretools<\/code>\u53ef\u4ee5\u81ea\u52a8\u5316\u7279\u5f81\u5de5\u7a0b\u7684\u8fc7\u7a0b\uff0c\u5e2e\u52a9\u4f60\u751f\u6210\u548c\u7ba1\u7406\u7279\u5f81\uff1b\u800c<code>Dask<\/code>\u5219\u9002\u5408\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u96c6\uff0c\u80fd\u591f\u5728\u5206\u5e03\u5f0f\u73af\u5883\u4e2d\u9ad8\u6548\u4fdd\u5b58\u548c\u52a0\u8f7d\u7279\u5f81\u3002\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u6709\u52a9\u4e8e\u63d0\u9ad8\u7279\u5f81\u7684\u7ba1\u7406\u6548\u7387\u548c\u6a21\u578b\u7684\u6027\u80fd\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u4fdd\u4fdd\u5b58\u7684\u7279\u5f81\u5728\u6a21\u578b\u91cd\u7528\u65f6\u4e0d\u4e22\u5931\u4fe1\u606f\uff1f<\/strong><br \/>\u4e3a\u4e86\u786e\u4fdd\u4fdd\u5b58\u7684\u7279\u5f81\u5728\u6a21\u578b\u91cd\u7528\u65f6\u5b8c\u6574\u65e0\u635f\uff0c\u53ef\u4ee5\u91c7\u53d6\u51e0\u4e2a\u63aa\u65bd\u3002\u9996\u5148\uff0c\u4f7f\u7528\u6807\u51c6\u5316\u7684\u6570\u636e\u683c\u5f0f\u4fdd\u5b58\u7279\u5f81\uff0c\u5982CSV\u6216Parquet\uff0c\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u6570\u636e\u683c\u5f0f\u4e0d\u517c\u5bb9\u95ee\u9898\u3002\u5176\u6b21\uff0c\u8bb0\u5f55\u7279\u5f81\u7684\u751f\u6210\u8fc7\u7a0b\uff0c\u5305\u62ec\u6570\u636e\u6e05\u6d17\u3001\u7279\u5f81\u9009\u62e9\u548c\u8f6c\u6362\u7684\u6b65\u9aa4\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u91cd\u65b0\u751f\u6210\u7279\u5f81\u3002\u6700\u540e\uff0c\u5b9a\u671f\u5907\u4efd\u4fdd\u5b58\u7684\u7279\u5f81\u6587\u4ef6\uff0c\u4ee5\u9632\u6570\u636e\u4e22\u5931\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4fdd\u5b58\u7279\u5f81\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528pickle\u6a21\u5757\u4fdd\u5b58\u4e3a\u6587\u4ef6\u3001\u4f7f\u7528joblib\u6a21\u5757\u8fdb\u884c\u538b\u7f29\u5b58\u50a8\u3001\u5c06\u7279\u5f81\u5b58\u5165\u6570 [&hellip;]","protected":false},"author":3,"featured_media":932367,"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\/932365"}],"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=932365"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/932365\/revisions"}],"predecessor-version":[{"id":932368,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/932365\/revisions\/932368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/932367"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=932365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=932365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=932365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}