MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / csv2txt

Method csv2txt

python/graphvite/dataset.py:225–236  ·  view source on GitHub ↗

Convert ``csv`` to ``txt``. Parameters: csv_file: csv file txt_file: txt file

(self, csv_file, txt_file)

Source from the content-addressed store, hash-verified

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 """

Callers 2

graph_preprocessMethod · 0.80
label_preprocessMethod · 0.80

Calls 2

relpathMethod · 0.95
infoMethod · 0.45

Tested by

no test coverage detected