With this code I can convert a certain column of an xlsx into a list. I need a function that looks in the directory where I am if there is any file with the values that are in my list called to:
>>> [u'Jose', u'Martin', u'Pedro']
print jose
>>> Jose.xlsx
print martin
>>> Martin.xlsx
print pedro
>>> Pedro.xlsx
As I said before, I need you to look in the folder where I am if there is any file that is named Jose, Martin and Pedro
import csv
import pandas as pd
import xlrd
file_name = 'Today.xlsx'
xl_file = pd.ExcelFile(file_name)
dfs = {sheet_name: xl_file.parse(sheet_name)
for sheet_name in xl_file.sheet_names}
a = dfs['Hoja1']['Cliente']
a = a.tolist()
jose = a[0]
jose =str(jose) + '{}'.format(file_type)
martin = a[1]
martin =str(martin) + '{}'.format(file_type)
pedro = a[2]
pedro =str(pedro) + '{}'.format(file_type)