Add column names to the begining of shuffled dataset

This commit is contained in:
s487179 2023-04-14 18:39:47 +02:00
parent 406cbb0780
commit 67261c7309

View File

@ -4,5 +4,5 @@ kaggle datasets download -d rishikeshkonapure/home-loan-approval
unzip -o home-loan-approval.zip
cat loan_sanction_test.csv loan_sanction_train.csv > loan_sanction.csv
head -n 5 loan_sanction.csv
{ head -n 1 loan_sanction.csv && tail -n +2 loan_sanction.csv | shuf; } | tail -n +2 | head -n $(($CUTOFF+1)) > loan_sanction_shuffled.csv
{ head -n 1 loan_sanction.csv && tail -n +2 loan_sanction.csv | shuf; } | tail -n +2 | head -n $(($CUTOFF+1)) | cat <(head -n 1 loan_sanction.csv) - > loan_sanction_shuffled.csv
head -n 5 loan_sanction_shuffled.csv