我需要有关如何将此SAS代码转换为Pyspark DataFrame的帮助?我试着计算日期(+/- 2)
Pysaprk新日期计算 -
nuclear_df = nuclear_df.withColumn("two_before",F.lit(date_sub(nuclear_df.withColumn(FDOS_LN),2)))
.withColumn("two_after",F.lit(date_add(FDOS_LN,2))
需要转换为pyspark DF的SAS代码:
select * from radio_df where MBR_ID not in
( select distinct MBR_ID from radio_df a , nuclear_df b
where a.MBRID =b.MBR_ID and a.FDOS_LN between two_before and two_after )