Skip to content

Commit

Permalink
Clearing Data
Browse files Browse the repository at this point in the history
  • Loading branch information
Tirth-Thakkar committed Jun 1, 2024
1 parent e19ef6e commit 119c230
Show file tree
Hide file tree
Showing 935 changed files with 5 additions and 31,795 deletions.
7 changes: 5 additions & 2 deletions _data/ApesSurvivorship.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

def prepare_data(csv_file):
df = pd.read_csv(csv_file)

# Getting base file name without the extension to construct output csv to account for multiple types across files with same name
file_base_name = os.path.splitext(os.path.basename(csv_file))[0]

if 'Type' not in df.columns:
raise ValueError("Column 'Type' not found in the CSV file")
Expand All @@ -25,7 +28,7 @@ def prepare_data(csv_file):
for type_name, group, in df_expanded.groupby('Type'):
# Construct the path to the output file
sanitized_type_name = type_name.replace('/', '_').replace('\\', '_')
output_file = os.path.join(output_dir, f"{sanitized_type_name}.csv")
output_file = os.path.join(output_dir, f"{file_base_name}{sanitized_type_name}.csv")

# Save the grouped data to a new CSV file
group.to_csv(output_file, index=False)
Expand Down Expand Up @@ -126,7 +129,7 @@ def calculate_age_range(age):

dog_life_expectancy = os.path.join(data_dir, "dog_life_expectancy.csv")
acturial_data_19thC = os.path.join(data_dir, "actuarial_Data_19th_cent_NJ_burials.csv")
acturial_data_20thC = os.path.join(data_dir, "actuarial_Data_20th_cent_SD_burials.csv")
acturial_data_20thC = os.path.join(data_dir, "actuarial_data_20th_cent_SD_burials.csv")

prepare_data(dog_life_expectancy)
prepare_data(acturial_data_19thC)
Expand Down
2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/..csv

This file was deleted.

5 changes: 0 additions & 5 deletions _data/CSV_Data/CSV_Data_Processed/0.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/AKITTA.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/ALSATION X ROTTWEILER.csv

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/AUSTRALIAN SHEPERD.csv

This file was deleted.

3 changes: 0 additions & 3 deletions _data/CSV_Data/CSV_Data_Processed/Aberdeen Terrier.csv

This file was deleted.

8 changes: 0 additions & 8 deletions _data/CSV_Data/CSV_Data_Processed/Affenpinscher.csv

This file was deleted.

6 changes: 0 additions & 6 deletions _data/CSV_Data/CSV_Data_Processed/Afghan Hound.csv

This file was deleted.

4 changes: 0 additions & 4 deletions _data/CSV_Data/CSV_Data_Processed/Afghan.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/African Boerboel.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/African Mastiff.csv

This file was deleted.

3 changes: 0 additions & 3 deletions _data/CSV_Data/CSV_Data_Processed/African Sand Dog.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/African Wild Dog.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/Africanis.csv

This file was deleted.

3 changes: 0 additions & 3 deletions _data/CSV_Data/CSV_Data_Processed/Aidi X.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/Ainu Dog.csv

This file was deleted.

38 changes: 0 additions & 38 deletions _data/CSV_Data/CSV_Data_Processed/Airedale Terrier.csv

This file was deleted.

7 changes: 0 additions & 7 deletions _data/CSV_Data/CSV_Data_Processed/Akita Inu.csv

This file was deleted.

5 changes: 0 additions & 5 deletions _data/CSV_Data/CSV_Data_Processed/Akita X.csv

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/Alaskan Klee Kai.csv

This file was deleted.

5 changes: 0 additions & 5 deletions _data/CSV_Data/CSV_Data_Processed/Alaskan Malamute X.csv

This file was deleted.

48 changes: 0 additions & 48 deletions _data/CSV_Data/CSV_Data_Processed/Alaskan Malamute.csv

This file was deleted.

32 changes: 0 additions & 32 deletions _data/CSV_Data/CSV_Data_Processed/Alsatian X.csv

This file was deleted.

2 changes: 0 additions & 2 deletions _data/CSV_Data/CSV_Data_Processed/Alsatian x Labrador.csv

This file was deleted.

24 changes: 0 additions & 24 deletions _data/CSV_Data/CSV_Data_Processed/Alsatian.csv

This file was deleted.

9 changes: 0 additions & 9 deletions _data/CSV_Data/CSV_Data_Processed/Alsatian_Collie X.csv

This file was deleted.

5 changes: 0 additions & 5 deletions _data/CSV_Data/CSV_Data_Processed/American Akita.csv

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions _data/CSV_Data/CSV_Data_Processed/American Bull Dog.csv

This file was deleted.

6 changes: 0 additions & 6 deletions _data/CSV_Data/CSV_Data_Processed/American Bull Terrier X.csv

This file was deleted.

5 changes: 0 additions & 5 deletions _data/CSV_Data/CSV_Data_Processed/American Bull Terrier.csv

This file was deleted.

7 changes: 0 additions & 7 deletions _data/CSV_Data/CSV_Data_Processed/American Bull dog X SBT.csv

This file was deleted.

30 changes: 0 additions & 30 deletions _data/CSV_Data/CSV_Data_Processed/American Bulldog X.csv

This file was deleted.

Loading

0 comments on commit 119c230

Please sign in to comment.