How should I be able to use a variable inside a lambda function ?
for a_name in name_field_names:
results = sqlContext.sql("SELECT * FROM noise_data")
stringsDS = results.map(lambda p:p.(a_name))
The lambda function is expecting me to give the name of the column, whereas I am giving a variable.
How should I pass the value of the a_name variable to the lambda function ?