本文整理汇总了Python中table.Table.from_csv方法的典型用法代码示例。如果您正苦于以下问题:Python Table.from_csv方法的具体用法?Python Table.from_csv怎么用?Python Table.from_csv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类table.Table
的用法示例。
在下文中一共展示了Table.from_csv方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_result
# 需要导入模块: from table import Table [as 别名]
# 或者: from table.Table import from_csv [as 别名]
def load_result(self):
self.cached_result = Table.from_csv(self.result_filename)
示例2: exit
# 需要导入模块: from table import Table [as 别名]
# 或者: from table.Table import from_csv [as 别名]
import datetime
import copy
import re
parser = argparse.ArgumentParser(description='Clean all of the datas.')
parser.add_argument( '--input', dest='input', default=False,
help='The csv to clean up.')
args = parser.parse_args()
if not os.path.exists( args.input ):
print args.input, " is not a valid file path. Please provide an --input x.csv argument to cleaner.py."
exit()
table = Table.from_csv( args.input )
output_table = copy.deepcopy( table )
NEWLINE = "_x000B_"
# convert all "_x000B_" characters to newlines.
#for row in table.rows:
# for i in xrange(0, len(row)):
# row[i] = row[i].replace(NEWLINE, "\n")
groups = {
'sin': [ "SIN", "SFU ID" ],
'semesters': [ "Semester of Approval of Supervisory Committee",
"Convocation Semester",
"Semester of Approval of Examining Committee",
"First Semester",