{"id":4436,"date":"2023-07-23T22:09:02","date_gmt":"2023-07-23T14:09:02","guid":{"rendered":"\/?p=4436"},"modified":"2023-07-24T21:22:19","modified_gmt":"2023-07-24T13:22:19","slug":"14-dataframe%e7%9b%b8%e5%85%b3%e7%ae%97%e5%ad%90","status":"publish","type":"post","link":"http:\/\/xinblog.ltd\/?p=4436","title":{"rendered":"14.DataFrame\u76f8\u5173\u7b97\u5b50"},"content":{"rendered":"<p>\u4e0a\u4e00\u8282\u6211\u4eec\u8bf4\u4e86Spark SQL\u8fd9\u4e00\u6784\u5efa\u4e8eSpark Core\u4e4b\u4e0a\u7684\u6846\u67b6\uff0c\u8fd9\u4e00\u6b21\u5c31\u8ba9\u6211\u4eec\u8bf4\u4e0bSpark SQL\u6846\u67b6\u4e2d\u5173\u952e\u7684\u6570\u636e\u7c7b\u578bDataFrame\u76f8\u5173\u7684\u6570\u636e\u5904\u7406\u7b97\u5b50\uff0c\u4e3b\u8981\u53ef\u4ee5\u5206\u4e3a\u4e24\u7c7b\uff0c\u4e00\u7c7b\u662f\u7ed3\u6784\u5316\u67e5\u8be2\u8bed\u8a00\u4e5f\u5c31\u662fsql,\u53e6\u4e00\u7c7b\u5219\u662fDataFrame\u76f8\u5173\u7684\u5f00\u53d1\u7b97\u5b50\u3002<\/p>\n<p>\u90a3\u4e48\u6211\u4eec\u5148\u8bf4SQL\u8bed\u53e5\uff0c\u5bf9\u4e8e\u4efb\u610f\u7684DataFrame\uff0c\u6211\u4eec\u90fd\u53ef\u4ee5\u4f7f\u7528createTempView\u6216\u8005createGlobalTempView \u5728Spark SQL\u4e2d\u521b\u5efa\u4e34\u65f6\u6570\u636e\u8868<\/p>\n<p>\u4e24\u8005\u4e00\u4e2a\u662f\u521b\u5efa\u7684\u4e34\u65f6\u8868\uff0c\u5176\u751f\u547d\u5468\u671f\u4ec5\u9650\u4e8eSparkSession\u5185\u90e8\uff0ccreateGlobalTempView\u521b\u5efa\u7684\u4e34\u65f6\u8868\uff0c\u53ef\u4ee5\u5728\u540c\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u8de8SparkSession\u63d0\u4f9b\u8bbf\u95ee<\/p>\n<p>\u6211\u4eec\u6765\u5c55\u793a\u4e0b\u5982\u4f55\u4f7f\u7528createTempView\u521b\u5efa\u4e34\u65f6\u8868<\/p>\n<p>\u57fa\u672c\u4ee3\u7801\u5982\u4e0b<\/p>\n<table>\n<tr>\n<td>\n  import org.apache.spark.sql.DataFrame<\/p>\n<p>import spark.implicits._<\/p>\n<p>val seq = Seq((&#8220;Alice&#8221;, 18),   (&#8220;Bob&#8221;, 14))<\/p>\n<p>val df = seq.toDF(&#8220;name&#8221;,   &#8220;age&#8221;)<\/p>\n<p>df.createTempView(&#8220;t1&#8221;)<\/p>\n<p>val query: String = &#8220;select * from   t1&#8221;<\/p>\n<p>\/\/ spark\u4e3aSparkSession\u5b9e\u4f8b\u5bf9\u8c61<\/p>\n<p>val result: DataFrame = spark.sql(query)<\/p>\n<p>result.show 13<\/p>\n<p>\/** \u7ed3\u679c\u6253\u5370<\/p>\n<p>+&#8212;&#8211;+&#8212;+<\/p>\n<p>| n ame| age|<\/p>\n<p>+&#8212;&#8211;+&#8212;+<\/p>\n<p>| Alice| 18|<\/p>\n<p>| Bob| 14|<\/p>\n<p>+&#8212;&#8211;+&#8212;+<\/p>\n<p>*\/<\/td>\n<\/tr>\n<\/table>\n<p>\u9996\u5148\u662f\u521b\u5efa\u6570\u636e\u96c6\uff0c\u7136\u540etoDF\u6765\u521b\u5efaDataFrame\uff0c\u4e4b\u540e\u5229\u7528createTempView\u521b\u5efa\u4e00\u4e2a\u4e34\u65f6\u8868\uff0c\u4e4b\u540e\u5229\u7528sql\u67e5\u8be2table\uff0c\u6700\u540eshow\u6765\u5c55\u793a<\/p>\n<p>\u9996\u5148\u8bf4\uff0cDataFrame\u4e4b\u95f4\u7684\u8f6c\u6362\u4e5f\u5c5e\u4e8e\u5ef6\u8fdf\u8ba1\u7b97\uff0c\u53ea\u6709\u51fa\u73b0Action\u7b97\u5b50\u7684\u65f6\u5019\uff0c\u624d\u4f1a\u53ca\u6027\u80fd\u6267\u884c<\/p>\n<p>\u5f53\u7136\uff0cSpark SQL\u8fd8\u5c01\u88c5\u4e86\u4e00\u4e9b\u5c5e\u4e8e\u81ea\u5df1\u7684\u51fd\u6570\uff0c\u6bd4\u5982array_distinct,collect_list<\/p>\n<p>\u53ef\u4ee5\u6d4f\u89c8\u5b98\u7f51\u7684Functions\u9875\u9762\u67e5\u627e\u5b8c\u6574\u7684\u51fd\u6570\u5217\u8868\u3002<\/p>\n<p>\u4e4b\u540e\u662fDataFrame\u76f8\u5173\u7684\u7b97\u5b50<\/p>\n<p>\u4e3b\u8981\u6e90\u4e8e\u4e86DataFrame\u76f8\u5173\u7684\u53cc\u9762\u6027\uff0c\u4e00\u65b9\u9762\u662f\u57fa\u4e8eRDD\uff0c\u6545RDD\u652f\u6301\u7684\u7b97\u5b50\uff0cDataFrame\u90fd\u652f\u6301\uff0c\u53e6\u4e00\u65b9\u9762\u5c31\u662f\u5c5e\u4e8e\u81ea\u5df1\u7b97\u5b50\uff0c\u57fa\u672c\u5217\u8868\u5982\u4e0b<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"149\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-31.png\" class=\"wp-image-4437\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-31.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-31-300x52.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-31-768x132.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u6211\u4eec\u6309\u7167\u4e0a\u56fe\u7684\u987a\u5e8f\u8fdb\u884c\u8bb2\u89e3<\/p>\n<p>\u9996\u5148\u662f\u548cRDD\u4e00\u6837\u7684\u7b97\u5b50<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"436\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-32.png\" class=\"wp-image-4438\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-32.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-32-300x151.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-32-768x387.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u7528\u6cd5\u8fd8\u662f\u8fd4\u56de\u90fd\u4e00\u6837<\/p>\n<p>\u7136\u540e\u662f\u63a2\u7d22\u7c7b\u7b97\u5b50<\/p>\n<p>\u4e3b\u8981\u662f\u7528\u4e8e\u4e86\u89e3\u7b97\u5b50\uff0c\u6bd4\u5982\u5b9e\u9645\u6570\u636e\uff0c\u6bd4\u5982\u6570\u636e\u683c\u5f0f\uff0c\u6267\u884c\u8ba1\u5212\uff0c\u5e38\u89c1\u7684\u5982\u4e0b<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"360\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-33.png\" class=\"wp-image-4439\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-33.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-33-300x125.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-33-768x320.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u5bf9\u4e8e\u6570\u636e\u683c\u5f0f\uff0ccolumns schema printSchema\u7528\u9014\u7c7b\u4f3c\uff0c\u90fd\u662f\u8d1f\u8d23\u83b7\u53d6\u6570\u636e\u7684\u683c\u5f0f<\/p>\n<p>\u6bd4\u5982\u6211\u4eec\u5229\u7528printSchema\uff0c\u83b7\u53d6\u7684\u7ed3\u679c\u5982\u4e0b<\/p>\n<p>\u9664\u4e86\u6570\u636e\u683c\u5f0f\u7b49\u4fe1\u606f\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528describe\u6765\u67e5\u770b\u5217\u503c\u7684\u5206\u5e03\u7edf\u8ba1\uff0c\u6bd4\u5982\u4f7f\u7528df.describe(\u201cage\u201d)\u6765\u83b7\u53d6\u5bf9\u5e94age\u5217\u7684\u6781\u503c\uff0c\u5e73\u5747\u503c\uff0c\u65b9\u5dee\u7b49\u4fe1\u606f<\/p>\n<p>\u4ee5\u53ca\u4f7f\u7528explain\u51fd\u6570\uff0c\u6765\u83b7\u53d6Spark SQL\u7ed9\u7684\u6267\u884c\u8ba1\u5212<\/p>\n<p>\u6e05\u6d17\u7c7b\u7b97\u5b50<\/p>\n<p>\u6211\u4eec\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u6e05\u6d17\uff0c\u6bd4\u5982\u5220\u9664\u67d0\u4e9b\u5217\uff0c\u5220\u9664\u67d0\u4e9b\u884c<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"358\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-34.png\" class=\"wp-image-4440\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-34.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-34-300x124.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-34-768x318.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u5176\u4e2ddrop\u51fd\u6570\u8d1f\u8d23\u5c06\u6307\u5b9a\u7684\u5217\u4eceDataFrame\u4e2d\u8fdb\u884c\u6e05\u9664\uff0c\u6bd4\u5982\u6211\u4eec\u60f3\u8981\u5c06\u4e0a\u9762\u7684\u6570\u636e\u7684gender\u5217\u6e05\u9664\uff0c\u76f4\u63a5\u8c03\u7528employees.DF.drop\uff08\u201cgender\u201d\uff09\u5373\u53ef\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7\u58f0\u660e\u591a\u4e2a\u5165\u53c2\u6765\u6e05\u9664\u591a\u4e2a\u5217<\/p>\n<p>\u5176\u6b21\u662fdistinct\uff0c\u8fdb\u884c\u53bb\u91cd\uff0c\u4ee5employeesDF\u4e3a\u4f8b\uff0c\u5f53\u6709\u591a\u4e2a\u6570\u636e\u8bb0\u5f55\u7684\u5b57\u6bb5\u503c\u76f8\u540c\u7684\u65f6\u5019\uff0c\u8fdb\u884c\u53bb\u91cd,dropDuplicates\u4e5f\u662f\u8fdb\u884c\u53bb\u91cd\uff0c\u4e0d\u8fc7\u662f\u6309\u7167\u67d0\u4e2a\u5b57\u6bb5\u8fdb\u884c\u53bb\u91cd\uff0c\u6bd4\u5982\u6309\u7167gender\u8fdb\u884c\u53bb\u91cd\uff0c\u6700\u540e\u7ed3\u679c\u53ea\u4f1a\u6709\u7537\u548c\u5973<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"246\" height=\"102\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-35.png\" class=\"wp-image-4441\" alt=\"\u56fe\u7247\" \/><\/p>\n<p>employees.dropDuplicates(\u201cgender\u201d).show<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"240\" height=\"77\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-36.png\" class=\"wp-image-4442\" alt=\"\u56fe\u7247\" \/><\/p>\n<p>\u6700\u540e\u4e00\u4e2a\u7b97\u5b50\u662fna\uff0c\u662f\u9009\u53d6DataFrame\u7684null\u6570\u636e\uff0cna\u5f80\u5f80\u914d\u5408drop\u6216\u8005fill\u4f7f\u7528\uff0cemployees.na.drop\u7528\u4e8e\u5220\u9664DataFrame\u4e2d\u7684null\u6570\u636e\uff0cemployees.na.fill\uff080\uff09\u5219\u662f\u5168\u90e8\u586b\u51450<\/p>\n<p>\u63a5\u4e0b\u6765\u662f\u8f6c\u6362\u7c7b\u7684\u7b97\u5b50<\/p>\n<p>\u57fa\u672c\u5982\u4e0b<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"526\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-37.png\" class=\"wp-image-4443\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-37.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-37-300x182.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-37-768x467.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u9996\u5148\u662fselect\uff0c\u9009\u53d6DataFrame\u4e0b\u7684\u90e8\u5206\u5b57\u6bb5<\/p>\n<p>employeesDF.select(\u201cname\u201d,\u201dgender\u201d).show<\/p>\n<p>\u5176\u6b21\u662fselectExpr\uff0c\u652f\u6301\u5176\u4e2d\u4e0d\u4ec5\u53ef\u4ee5\u9009\u62e9\u5b57\u6bb5\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684\u65b9\u5f0f\u751f\u6210\u65b0\u7684\u5b57\u6bb5<\/p>\n<p>employeesDF.select(\u201cname\u201d,\u201dgender\u201c\uff0c\u201dconcat(id, \u2018_\u2019, name)as id_name\u201c0).show<\/p>\n<p>\u8fd9\u6837\u6211\u4eec\u901a\u8fc7concat\u51fd\u6570\u6765\u5c06\u4e24\u4e2a\u5217\u62fc\u63a5\u540e\u5f62\u6210\u65b0\u7684\u6570\u636e\u5217<\/p>\n<p>\u5176\u6b21\u662fwhere\u548cwithColumnRenamed\u8fd9\u4e24\u4e2a\u7b97\u5b50\uff0c<\/p>\n<p>where \u914d\u5408sql\u8bed\u53e5\u5bf9DataFrame\u8fdb\u884c\u6570\u636e\u8fc7\u6ee4\uff0c\u6bd4\u5982<\/p>\n<p>employeesDF.where(\u201cgender = \u2018Male\u2019\u201d)<\/p>\n<p>withColumnRenamed\u5bf9\u5b57\u6bb5\u8fdb\u884c\u91cd\u547d\u540d<\/p>\n<p>withColumn\uff0c\u5219\u662f\u751f\u6210\u65b0\u7684\u6570\u636e\u5217\uff0c\u7c7b\u4f3cselectExpr,\u5176\u4e2d\u53ef\u4ee5\u5229\u7528sql\u51fd\u6570<\/p>\n<p>employeesDF.withColumn(\u201ccrypto\u201d,hash($\u201cage\u201d)).show<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"396\" height=\"177\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-38.png\" class=\"wp-image-4444\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-38.png 396w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-38-300x134.png 300w\" sizes=\"(max-width: 396px) 100vw, 396px\" \/><\/p>\n<p>\u6700\u540e\u4e00\u4e2a\u7b97\u5b50\uff0cexplode\uff0c\u5219\u662f\u5c55\u5f00\u6570\u7ec4\u7c7b\u578b\u7684\u6570\u636e\u5217\uff0c\u751f\u6210\u65b0\u7684\u6570\u636e\u8bb0\u5f55<\/p>\n<p>\u6bd4\u5982\u6211\u4eec\u6709\u4e2a\u6570\u7ec4\u5b57\u6bb5<\/p>\n<table>\n<tr>\n<td>\n  val seq = Seq( (1, &#8220;John&#8221;, 26,   &#8220;Male&#8221;, Seq(&#8220;Sports&#8221;, &#8220;News&#8221;)), 2 (2,   &#8220;Lily&#8221;, 28, &#8220;Female&#8221;, Seq(&#8220;Shopping&#8221;,   &#8220;Reading&#8221;)),<\/p>\n<p>(3, &#8220;Raymond&#8221;, 30, &#8220;Male&#8221;, Seq(&#8220;Sports&#8221;,   &#8220;Reading&#8221;))<\/p>\n<p>)<\/p>\n<p>val employeesDF: DataFrame =   seq.toDF(&#8220;id&#8221;, &#8220;name&#8221;, &#8220;age&#8221;,   &#8220;gender&#8221;, &#8220;interests&#8221;)<\/p>\n<p>employeesDF.withColumn(&#8220;interest&#8221;,   explode($&#8221;interests&#8221;)).show<\/td>\n<\/tr>\n<\/table>\n<p>\u5f97\u5230\u7684\u7ed3\u679c\u5982\u4e0b<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"579\" height=\"260\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-39.png\" class=\"wp-image-4445\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-39.png 579w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-39-300x135.png 300w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/p>\n<p>\u5c06\u6570\u636e\u8fdb\u884c\u4e86\u5c55\u5f00<\/p>\n<p>\u8fd8\u6709\u5c31\u662f\u5206\u6790\u7c7b\u7684\u7b97\u5b50<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"364\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-40.png\" class=\"wp-image-4446\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-40.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-40-300x126.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-40-768x323.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u5bf9\u4e8ejoin\uff0c\u6211\u4eec\u4e4b\u524d\u6f14\u793a\u8fc7\uff0c\u9700\u8981\u6211\u4eec\u58f0\u660e\u5173\u8054\u952e\u548c\u5173\u8054\u7684\u5f62\u5f0f<\/p>\n<p>\u5176\u6b21\u662fgroupBy,\u5f80\u5f80\u914d\u5408agg\u8fdb\u884c\u4f7f\u7528<\/p>\n<p>\u6bd4\u5982<\/p>\n<p>Val result = df.groupBy(\u201cgender\u201d).agg(sum(\u201csalary\u201d).as(\u201csum_salary\u201d))<\/p>\n<p>\u5f97\u5230\u7ed3\u679c<\/p>\n<p>\u6700\u540e\u662fsort\u6216\u8005orderBy\u4e24\u8005\u90fd\u662f\u5bf9\u6570\u636e\u96c6\u8fdb\u884c\u6392\u5e8f\uff0c\u7528\u6cd5\u548c\u6548\u679c\u662f\u4e00\u81f4\u7684<\/p>\n<p>\u6bd4\u5982<\/p>\n<p>employeesDF.sort(desc(\u201csum_salary\u201d,asc(\u201cgender\u201d))).show<\/p>\n<p>\u5230\u6b64\uff0c\u6211\u4eec\u9664\u4e86\u6700\u540e\u7684\u8f93\u51fa\u7b97\u5b50\u90fd\u8bf4\u5b8c\u4e86\uff0c\u5173\u4e8e\u6301\u4e45\u5316\u7b97\u5b50\uff0c\u5219\u8ddfread API\u7c7b\u4f3c\uff0c\u90fd\u7531format\u5b9a\u4e49\u7684\u6587\u4ef6\u683c\u5f0f\uff0c\u591a\u4e2a\u5199\u5165\u9009\u9879\uff0c\u4ee5\u53casave\u8def\u5f84\u7ec4\u6210<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"225\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-41.png\" class=\"wp-image-4447\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-41.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-41-300x78.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-41-768x200.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u5173\u4e8e\u4e0d\u540c\u7684option\uff0c\u5219\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863<\/p>\n<p>\u6bd4\u5982\u5176\u4e2d\u7684mode\u6709<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"865\" height=\"366\" src=\"\/wp-content\/uploads\/2023\/07\/unnamed-file-42.png\" class=\"wp-image-4448\" alt=\"\u56fe\u7247\" srcset=\"http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-42.png 865w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-42-300x127.png 300w, http:\/\/xinblog.ltd\/wp-content\/uploads\/2023\/07\/unnamed-file-42-768x325.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>\u603b\u7ed3\u4e00\u4e0b\u672c\u7ae0\uff0c\u6211\u4eec\u8bb2\u8ff0DataFrame\u4e0d\u540c\u9636\u6bb5\u7684\u5904\u7406\u7b97\u5b50<\/p>\n<p>\u5206\u522b\u662f\u540c\u7c7b\u7b97\u5b50<\/p>\n<p>\u63a2\u7d22\u7c7b\u7b97\u5b50<\/p>\n<p>\u6e05\u6d17\u7c7b\u7b97\u5b50<\/p>\n<p>\u8f6c\u6362\u7c7b\u7b97\u5b50<\/p>\n<p>\u5206\u6790\u7c7b\u7b97\u5b50<\/p>\n<p>\u6301\u4e45\u5316\u7b97\u5b50<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u4e00\u8282\u6211\u4eec\u8bf4\u4e86Spark SQ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"_links":{"self":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/4436"}],"collection":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4436"}],"version-history":[{"count":0,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/4436\/revisions"}],"wp:attachment":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4436"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}