Download utils/preprocessing.py from Statogale/Diabetes_Disease_Outcome_AI_System_ML: direct link, hf CLI and curl.
- Browser
- Download file 313 Bytes
-
https://huggingface.co/spaces/Statogale/Diabetes_Disease_Outcome_AI_System_ML/resolve/main/utils/preprocessing.py
- Command line
-
hf download hf://spaces/Statogale/Diabetes_Disease_Outcome_AI_System_ML/utils/preprocessing.py
-
curl -L -o preprocessing.py https://huggingface.co/spaces/Statogale/Diabetes_Disease_Outcome_AI_System_ML/resolve/main/utils/preprocessing.py
313 Bytes
| import pandas as pd | |
| from typing import Dict, Any | |
| def dataframe_from_dict(data: Dict[str, Any]) -> pd.DataFrame: | |
| """ | |
| Converts a single dictionary input into a DataFrame | |
| suitable for scikit-learn pipelines. | |
| """ | |
| # Create DataFrame from single record | |
| df = pd.DataFrame([data]) | |
| return df | |