Convert ``csv`` to ``txt``. Parameters: csv_file: csv file txt_file: txt file
(self, csv_file, txt_file)
| 223 | raise AttributeError("Can't resolve split `%s`" % key) |
| 224 | |
| 225 | def csv2txt(self, csv_file, txt_file): |
| 226 | """ |
| 227 | Convert ``csv`` to ``txt``. |
| 228 | |
| 229 | Parameters: |
| 230 | csv_file: csv file |
| 231 | txt_file: txt file |
| 232 | """ |
| 233 | logger.info("converting %s to %s" % (self.relpath(csv_file), self.relpath(txt_file))) |
| 234 | with open(csv_file, "r") as fin, open(txt_file, "w") as fout: |
| 235 | for line in fin: |
| 236 | fout.write(line.replace(",", "\t")) |
| 237 | |
| 238 | def top_k_label(self, label_file, save_file, k, format="node-label"): |
| 239 | """ |
no test coverage detected