如何使用Dataframe中的一列来划分Spark中另一个DataFrame中的一列?(使用Python)

时间:2016-10-08 04:28:31

标签: spark-dataframe

我有两个DataFrame: 一个包括每天的请求总数,称为total_req_per_day_df,就像:

enter image description here

另一个DataFrame包含每天唯一主机的数量,称为daily_hosts_df,就像

一样

enter image description here

现在我想使用每天的请求总数(跨所有主机)来划分每天唯一主机的数量,以计算每台主机的平均请求数。如何使用python在Spark中编程?

0 个答案:

没有答案