Browse Source

new dirty csv with rpe

master
PerryXDeng 5 years ago
parent
commit
de40fd51d5
2 changed files with 2 additions and 8 deletions
  1. +0
    -0
      data_preparation/cleaned/notnormalized_with_continuousNan_rpe.csv
  2. +2
    -8
      data_preparation/rpe_processing.py

data_preparation/cleaned/notnormalized_clean_rpe.csv → data_preparation/cleaned/notnormalized_with_continuousNan_rpe.csv View File


+ 2
- 8
data_preparation/rpe_processing.py View File

@ -10,12 +10,6 @@ def vectorize_mult(column, dictionary, postfix, df, file=None):
csv = pd.read_csv("data/rpe.csv") csv = pd.read_csv("data/rpe.csv")
training = csv["Training"].unique()
session = csv["SessionType"].unique()
boms = csv["BestOutOfMyself"].unique()
print(training)
print(session)
print(boms)
vectorize_mult("Training", {"No": 0, "Yes": 1}, "", csv) vectorize_mult("Training", {"No": 0, "Yes": 1}, "", csv)
mapping = {"Mobility/Recovery": 1, "Game": 0, "Skills": 0, "Conditioning": 0, mapping = {"Mobility/Recovery": 1, "Game": 0, "Skills": 0, "Conditioning": 0,
@ -57,5 +51,5 @@ mapping[np.nan] = 1
vectorize_mult('BestOutOfMyself', mapping, "Unknown", csv) vectorize_mult('BestOutOfMyself', mapping, "Unknown", csv)
mapping[np.nan] = 0 mapping[np.nan] = 0
print(csv.isnull().sum*())
csv.to_csv("cleaned/notnormalized_clean_rpe.csv")
print(csv.isnull().sum())
csv.to_csv("cleaned/notnormalized_with_continuousNan_rpe.csv")

Loading…
Cancel
Save