Spaces:
Sleeping
Sleeping
Download src/utils/proccess_data.py from Roaoch/CyberClassic: direct link, hf CLI and curl.
- Browser
- Download file 222 Bytes
-
https://huggingface.co/spaces/Roaoch/CyberClassic/resolve/main/src/utils/proccess_data.py
- Command line
-
hf download hf://spaces/Roaoch/CyberClassic/src/utils/proccess_data.py
-
curl -L -o proccess_data.py https://huggingface.co/spaces/Roaoch/CyberClassic/resolve/main/src/utils/proccess_data.py
222 Bytes
| import pandas as pd | |
| df = pd.read_csv('dataset.csv')['text'].values | |
| res = [ | |
| ' '.join(txt.split(' ')[:3]) | |
| for txt in df | |
| ] | |
| res_df = pd.DataFrame({ | |
| 'text': | |
| res | |
| }) | |
| res_df.to_csv('startings.csv', index=False) | |