I am working with PySpark dataframes here. \"test1\" is my PySpark dataframe and event_date is a TimestampType. So when I try to get a distinct count of event_date, the resu
try this
loop_cnt=test1.select('event_date').distinct().count() var = loop_cnt.collect()[0]
Hope this helps