Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
14 changes: 10 additions & 4 deletions q01_load_data_and_add_column_names/build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import pandas as pd
import pandas as pd
import numpy as np
def q01_load_data_and_add_column_names(path):
data=pd.read_csv(path,header=None,names=['account_status', 'month', 'credit_history', 'purpose', 'credit_amount', 'savings_account/bonds',
'employment', 'installment_rate', 'personal_status/sex', 'guarantors', 'residence_since',
'property', 'age', 'other_installment_plans', 'housing', 'number_of_existing_credits', 'job', 'liable', 'telephone', 'foreign_worker', 'good/bad'])

data.loc[data['good/bad'] == 1, 'good/bad'] = 0
data.loc[data['good/bad'] == 2, 'good/bad'] = 1
return data
credit=q01_load_data_and_add_column_names('./data/GermanData.csv')

path = 'data/GermanData.csv'

def q01_load_data_and_add_column_names():
Binary file not shown.
Binary file not shown.