I need to read a bunch of csv files in pyspark in databricks.
spark.read.option("header", True).format("csv").load('path/2021', 'path/2020')
Is it possible to make it dynamic with some variables like this?
years_to_query = ['2020', '2021']
path = 'path'
I'm trying to concatenate but I'm not getting the desired result.