Download predictor/utils.py from Pushpak21/SuperKart_Sales_Forecast_Frontend: direct link, hf CLI and curl.
- Browser
- Download file 224 Bytes
-
https://huggingface.co/spaces/Pushpak21/SuperKart_Sales_Forecast_Frontend/resolve/main/predictor/utils.py
- Command line
-
hf download hf://spaces/Pushpak21/SuperKart_Sales_Forecast_Frontend/predictor/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Pushpak21/SuperKart_Sales_Forecast_Frontend/resolve/main/predictor/utils.py
224 Bytes
| def reorder_columns(df, front_cols): | |
| other_cols = [col for col in df.columns if col not in front_cols] | |
| return df[front_cols + other_cols] | |
| def get_csv_download(df): | |
| return df.to_csv(index=False).encode("utf-8") | |