list1 = ('alpha', 'beta', 'gamma', 'eta', 'Theta')
list2 = ('alpha', 'beta')
df1 = spark.createDataFrame(list1, 'String').withColumnRenamed('value', 'dataset')
df2 = spark.createDataFrame(list2, 'String').withColumnRenamed('value', 'dataset')
df = df1.exceptAll(df2)
list_of_values = [data[0] for data in df.collect()]
dbutils.widgets.dropdown("dataset", list_of_values[0], list_of_values)
dataset = dbutils.widgets.get("dataset")
print(dataset)
In above code is there a way to get data from user after widget creation?