本文整理汇总了Python中FileIO.csvReaderCS方法的典型用法代码示例。如果您正苦于以下问题:Python FileIO.csvReaderCS方法的具体用法?Python FileIO.csvReaderCS怎么用?Python FileIO.csvReaderCS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileIO
的用法示例。
在下文中一共展示了FileIO.csvReaderCS方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: readAttributeInfo
# 需要导入模块: import FileIO [as 别名]
# 或者: from FileIO import csvReaderCS [as 别名]
def readAttributeInfo(self):
"""Reads CSV File for Project of type CS
self.initial = (dict) with first row names as keys and list of values
as values
"""
file = self.fileName
info = FIO.csvReaderCS(file)
self.initial = info.newVars
self.addInitialShapesVariable()
示例2: readJoinCSV
# 需要导入模块: import FileIO [as 别名]
# 或者: from FileIO import csvReaderCS [as 别名]
def readJoinCSV(self,fileName,delimiter=","):
"""Reads csv file with CS variables
fileName = str() path/filename of csv file
nameField = str() string to identify which column will be used to
match with csnames
checks new vars into ProjectMaker
returns list of new variable names
"""
self.data2Join = FIO.csvReaderCS(fileName,delimiter=delimiter)
self.joinData = self.createJoinTable()
示例3: readCSV_CS
# 需要导入模块: import FileIO [as 别名]
# 或者: from FileIO import csvReaderCS [as 别名]
def readCSV_CS(self,fileName,delimiter=","):
"""Reads csv file with CS variables
fileName = str() path/filename of csv file
checks new vars into ProjectMaker
returns list of new variable names
"""
cs = FIO.csvReaderCS(fileName,delimiter=delimiter)
for i in cs.names:
self.createVariable(i, "CS", [cs.newVars[i]])
return cs.names