Getting an error on the if else statement below. Any ideas? My intention is not to print, but to trigger an email in python if > 5 Thx!!
df2 = df.select("pull_date","promo_amt") \
.groupby("pull_date") \
.agg(count("promo_amt").alias("Tots"),sum("promo_amt").alias("Sums")) \
.filter(df["pull_date"] == current_date()) \
if df2['Tots'] > 5:
print(">5")
else:
print("<=5")`
from Recent Questions - Stack Overflow https://ift.tt/3iUTg5a
https://ift.tt/eA8V8J
No comments:
Post a Comment