I want to loop through a directory and find specific xlsx files and then put them each into separate pandas dataframe. The thing here is that I also want all sheets in those excel files to be in the dataframe.
Below is a sample of code that I implemented, I just need to add the logic to pick all sheets:
import pandas as pd
from glob import glob
path = 'path_to_file'
files = glob(path + '/*file*.xlsx')
get_df = lambda f: pd.read_excel(f)
dodf = {f: get_df(f) for f in files}
dodf[files[2]] --- dictionary of dataframes