ãã¾ã«ãã¬ã³ã¼ããæã¤å¤æ°éã§ã³ãµã¤ã³é¡ä¼¼åº¦ãè¨ç®ãããæãããã®ã§ãåå¿ã¨ãã¦æ¸ãã¦ãã ãªãã以ä¸ã®ä¾ã§æ±ããã¼ã¿ã¯ãé©å½ãªIDã¨ç´ã¥ãããããã¯ãã«ããã¤ãã¼ã¿ãã¬ã¼ã ã¨ããã from pyspark.mllib.linalg import Vectors data = sc.parallelize([ ("a", Vectors.dense([0, 1, 2])), ("b", Vectors.dense([3, 4, 5])), ("c", Vectors.dense([6, 7, 8])) ]).toDF(["id", "features"]) # é©å½ã«äº¤å·®çµåã§çµã¿åãããã¼ã¿ _data = data.select(col("id").alias("_id"), col("features").alias("_features")) tgt_data = data.cr
{{#tags}}- {{label}}
{{/tags}}