I have created a dataframe by reading a csv file as follows:
out_df = spark.read.csv(r"group_number_out.csv", header=True, inferSchema=True)
out_df = out_df.withColumn("dates", F.col('dates').cast(DateType()))
out_df.show()
Now I want to concat the dataframe name(out_df) with a variable user_name which is an input.
Let user_name = 'tom'
So, now the required output is something like tom_out_df which should be same as out_df.
That is tom_out_df = out_df.