Adds script to convert to csv

This commit is contained in:
Daniel Svitan 2024-12-16 10:52:27 +01:00
parent 505b4eeb55
commit 2ec2a533b2
2 changed files with 10 additions and 0 deletions

3
.gitignore vendored
View File

@ -8,3 +8,6 @@ __pycache__/
*.zip
*.csv
*.npy
*.jasp
*.txt

7
to-csv.py Normal file
View File

@ -0,0 +1,7 @@
import numpy as np
import pandas as pd
arr = np.load("clean.npy")
df = pd.DataFrame(arr)
df.columns = ["grade", "sex", "average grade", "math grade", "slovak grade", "english grade", "ses", "occupation", "living situation", "commute length", "sleep", "absence"]
df.to_csv("clean.csv")