Spaces:
Build error
Build error
Download load_data.py from student-abdullah/NextGrocery: direct link, hf CLI and curl.
- Browser
- Download file 308 Bytes
-
https://huggingface.co/spaces/student-abdullah/NextGrocery/resolve/main/load_data.py
- Command line
-
hf download hf://spaces/student-abdullah/NextGrocery/load_data.py
-
curl -L -o load_data.py https://huggingface.co/spaces/student-abdullah/NextGrocery/resolve/main/load_data.py
308 Bytes
| # Importing libraries | |
| import pandas as pd | |
| # Load data | |
| df = pd.read_csv("Basket.csv", header=None, names=range(20)) | |
| # Loop to convert all values to string and discard NaN values | |
| items = [] | |
| for i in range(len(df)): | |
| items.append([str(df.values[i, j]) for j in range(20) if str(df.values[i, j]) != "nan"]) | |