Skip to content

Commit

Permalink
change logic to create_new_columnnames_filename
Browse files Browse the repository at this point in the history
  • Loading branch information
nickolasteixeira committed Mar 5, 2020
1 parent 5e22655 commit 330efe2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/create_column_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def create_new_unique_header_mappings(headers, unique_headers_dict, filename):
def create_new_columnnames_filename(filename):
# File names are currently in this format SF_Development_Pipeline_2017_Q1.csv
# parse filename and create a new filename to this format YYYYQ#.txt
new_file_arr = filename.split(".")[0].split("_")[-2:]

new_file_arr = filename.split(".")[0].split("_")
new_file_arr = new_file_arr[-3] + new_file_arr[-2][0] + new_file_arr[-1]
return ''.join(new_file_arr) + '.txt'


Expand Down

0 comments on commit 330efe2

Please sign in to comment.