ium_z487177/script.sh

20 lines
547 B
Bash
Raw Normal View History

2023-04-19 19:04:17 +02:00
#!/bin/bash
2023-04-19 19:37:46 +02:00
# Pobierz zbiór danych
kaggle datasets download -d iabhishekofficial/mobile-price-classification --force
2023-04-19 19:04:17 +02:00
2023-04-19 19:37:46 +02:00
# Wypakuj pobrany zbiór danych
unzip -o mobile-price-classification.zip
2023-04-19 19:04:17 +02:00
2023-04-19 19:37:46 +02:00
# Przetwórz dane
INPUT_FILE="train.csv"
OUTPUT_FILE="output.txt"
# Symulacja przetwarzania pliku - wybierz pierwszych 100 wierszy
head -n 100 "$INPUT_FILE" > "$OUTPUT_FILE"
# Usuń kolumny o indeksach 1, 3 i 4
cut -f 1,3,4 --complement -d "," -s "$OUTPUT_FILE" > tmp.txt && mv tmp.txt "$OUTPUT_FILE"
# Archiwizuj wynikowe dane
2023-04-19 19:47:32 +02:00
gzip -f "$OUTPUT_FILE"