Get all columns from properties_description.csv and files in crosswalks/, and concatenates them; returning a list of columns.
()
| 57 | return sorted(os.listdir(SOURCE_DIR)) |
| 58 | |
| 59 | def aggregate(): |
| 60 | """Get all columns from properties_description.csv and files in |
| 61 | crosswalks/, and concatenates them; returning a list of columns.""" |
| 62 | |
| 63 | # Get the three left-most columns from properties_description.csv |
| 64 | with open(PROP_DESC_PATH) as fd: |
| 65 | prop_desc = columns_from_rows(csv.reader(fd)) |
| 66 | |
| 67 | # Get the other columns, one per .csv file in crosswalks/ |
| 68 | columns = [] |
| 69 | for filename in list_crosswalks(): |
| 70 | if filename.endswith('.csv'): |
| 71 | columns.append(read_terms(prop_desc, filename)) |
| 72 | |
| 73 | return prop_desc + columns |
| 74 | |
| 75 | def rm_file(filename): |
| 76 | """Removes a file if it exists, does nothing otherwise.""" |
no test coverage detected