Combine Dictionary Of Dataframes Into 1 Single Dataframe
I am looking for a solution to put all my dataframes which are in a dictionary into 1 single giant dataframe. I am relatively new to Python so I am unable to understand how to iter
Solution 1:
I think need concat
with dict comprehension:
dodf = {f: pd.read_excel(f, sheet_name=None) for f in files}
df = pd.concat([v for k,v in dodf.items()])
Or:
dodf = {f: pd.read_excel(f, sheet_name=None) for f in files}
df = pd.concat([pd.concat(v) for k,v in dodf.items()])
Post a Comment for "Combine Dictionary Of Dataframes Into 1 Single Dataframe"