mirror of
https://github.com/DISARMFoundation/DISARMframeworks.git
synced 2024-12-24 23:09:45 -05:00
20 lines
341 B
Python
20 lines
341 B
Python
|
import pandas as pd
|
||
|
|
||
|
|
||
|
def load_excel_data(infile):
|
||
|
"""Load an xlsx document.
|
||
|
|
||
|
Args:
|
||
|
infile (str): Path to an xlsx file.
|
||
|
|
||
|
Returns:
|
||
|
dict: xlsx sheets
|
||
|
|
||
|
"""
|
||
|
sheets = {}
|
||
|
xlsx = pd.ExcelFile(infile)
|
||
|
for sheetname in xlsx.sheet_names:
|
||
|
sheets[sheetname] = xlsx.parse(sheetname)
|
||
|
return sheets
|
||
|
|