我有一个非常大的pyspark数据帧.所以我想对它的子集执行预处理,然后将它们存储到hdfs.后来我想阅读所有这些并合并在一起.谢谢.
我有一个非常大的 Dataframe,有 8000 列和 50000 行。我想将其统计信息写入excel文件。我认为我们可以使用describe()
方法。但是如何以良好的格式将其编写为excel。谢谢
我有两个具有相同行数的 pyspark 数据框,但它们没有任何公共列。所以我使用 monotonically_increasing_id() 向它们添加新列
from pyspark.sql.functions import monotonically_increasing_id as mi
id=mi()
df1 = df1.withColumn("match_id", id)
cont_data = cont_data.withColumn("match_id", id)
cont_data = cont_data.join(df1,df1.match_id==cont_data.match_id, 'inner').drop(df1.match_id)
Run Code Online (Sandbox Code Playgroud)
但连接后生成的数据帧的行数较少。我在这里缺少什么。谢谢