I have a number of files that I want to look at and I would like to label each one based on a set of variable, e.g.,...
location = 'home'
source_system = 'Sys_'
date = '20160608'
file_name = location+source_system+date
print(file_name)
-> homeSys_20160608
...based on the file_name I want to use that to label the dataframe, so something like...
file_name = sqlContext.read.parquet(file_path)
I have the file_path defined elsewhere.
What happens when I try this is the dataframe is now named file_path not homeSys_20160608 which is what the variable originally was.
Is there any way to do what I want?
Basically I am wondering if there is a way to create a data frame based on variables. I want to create multiple data frames each with a different name so I can analyze them in one python notebook. Each data frame would have the same structure but different data populated.