Spaces:
No application file
No application file
Download sheet_reader.py from DPPATRA/Dyeing_urgency_priority_calculator: direct link, hf CLI and curl.
- Browser
- Download file 265 Bytes
-
https://huggingface.co/spaces/DPPATRA/Dyeing_urgency_priority_calculator/resolve/main/sheet_reader.py
- Command line
-
hf download hf://spaces/DPPATRA/Dyeing_urgency_priority_calculator/sheet_reader.py
-
curl -L -o sheet_reader.py https://huggingface.co/spaces/DPPATRA/Dyeing_urgency_priority_calculator/resolve/main/sheet_reader.py
265 Bytes
| # sheet_reader.py | |
| import pandas as pd | |
| def list_sheets(file_path: str): | |
| xls = pd.ExcelFile(file_path) | |
| return xls.sheet_names | |
| def read_sheet(file_path: str, sheet_name: str) -> pd.DataFrame: | |
| return pd.read_excel(file_path, sheet_name=sheet_name) |