add writing column names in logfile
This commit is contained in:
@ -171,6 +171,13 @@ class log:
|
|||||||
colmap = range(self.nvec)
|
colmap = range(self.nvec)
|
||||||
|
|
||||||
f = open(filename,"w")
|
f = open(filename,"w")
|
||||||
|
|
||||||
|
# write col names from dict in the right order
|
||||||
|
colnames = [k for j in colmap for k,v in self.ptr.items() if v == j]
|
||||||
|
for j in range(len(colnames)):
|
||||||
|
print(colnames[j], file=f, end=" ")
|
||||||
|
print("\n", file=f, end="")
|
||||||
|
|
||||||
# write data
|
# write data
|
||||||
for i in range(self.nlen):
|
for i in range(self.nlen):
|
||||||
for j in range(len(colmap)):
|
for j in range(len(colmap)):
|
||||||
|
|||||||
Reference in New Issue
Block a user