本文整理汇总了Python中table.Table.getCapture方法的典型用法代码示例。如果您正苦于以下问题:Python Table.getCapture方法的具体用法?Python Table.getCapture怎么用?Python Table.getCapture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类table.Table
的用法示例。
在下文中一共展示了Table.getCapture方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testIsEquivalentNestedLists
# 需要导入模块: from table import Table [as 别名]
# 或者: from table.Table import getCapture [as 别名]
def testIsEquivalentNestedLists(self):
if IGNORE_TEST:
return
try:
[column1, column2] = Table.getCapture("column_is_equivalent")
self.assertTrue(column1.isEquivalent(column2))
[column1, column2] = Table.getCapture("column_is_equivalent2")
self.assertTrue(column1.isEquivalent(column2))
except AttributeError as err:
# Can't handle the captured pickle file
return
示例2: testAddColumnsToDataframeMissingTable
# 需要导入模块: from table import Table [as 别名]
# 或者: from table.Table import getCapture [as 别名]
def testAddColumnsToDataframeMissingTable(self):
if IGNORE_TEST:
return
try:
table = self.api.getTable()
df, names = Table.getCapture(TEST_FILE1)
column_names = [c.getName() for c in table.getColumns()]
for name in names:
self.assertFalse(name in column_names)
self.api.addColumnsToTableFromDataframe(df, names=names)
column_names = [c.getName() for c in table.getColumns()]
for name in names:
self.assertTrue(name in column_names)
column = table.columnFromName(name)
self.assertIsNotNone(column.getTable())
except AttributeError as err:
# Can't handle the captured pickle file
pass
return