Skip to content

Commit 6cbd125

Browse files
author
Giancarlo Perrone
committed
readme added
1 parent 8bb0e5b commit 6cbd125

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Using the make_data.py script to generate more features
2+
3+
To add more features to the spotify data csv file, simply run the `make_data.py` script with no arguments. The 2 `.pkl` files in the project are important to maintain state of our data and the script checks for duplicates and avoids appending them. The running program can be terminated at any time and .pkl files will reflect the last entry added before halting. To actually add the data to the csv however, use the utility function in `utils.py` called `make_csv_from_features` and pass in the <i><b>unpickled</b></i> `features.pkl` structure as a single argument.
4+
5+
## Example
6+
7+
```python
8+
# some_script.py
9+
from utils import make_csv_from_features
10+
import pandas as pd
11+
features = pd.read_pickle("features.pkl")
12+
df = make_csv_from_features(features) # after this call, spotify_data.csv is updated.
13+
```
14+
15+
If you add new features, don't forget to push it!

data1.csv

-11
This file was deleted.

0 commit comments

Comments
 (0)