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 modified q01_load_data_and_add_column_names/__init__.pyc
Binary file not shown.
12 changes: 10 additions & 2 deletions q01_load_data_and_add_column_names/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@

path = 'data/GermanData.csv'

def q01_load_data_and_add_column_names():

def q01_load_data_and_add_column_names(path):
column_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']

df = pd.read_csv(path,header=None,names=column_names)
df['good/bad'] = df['good/bad'].map({1:0,2:1})
df.drop(999,axis=0,inplace=True)
return df
Binary file modified q01_load_data_and_add_column_names/build.pyc
Binary file not shown.
Binary file modified q01_load_data_and_add_column_names/tests/__init__.pyc
Binary file not shown.
Binary file modified q01_load_data_and_add_column_names/tests/test.pyc
Binary file not shown.