當前位置: 首頁>>代碼示例>>Python>>正文


Python DataCleaning.normalize方法代碼示例

本文整理匯總了Python中OperationUtils.data_operations.DataCleaning.normalize方法的典型用法代碼示例。如果您正苦於以下問題:Python DataCleaning.normalize方法的具體用法?Python DataCleaning.normalize怎麽用?Python DataCleaning.normalize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OperationUtils.data_operations.DataCleaning的用法示例。


在下文中一共展示了DataCleaning.normalize方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _addNewVersionCategory

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
    def _addNewVersionCategory(self, item, model, ver, count):
        versionName = DataCleaning.normalize(ver[0])
        pattern1 = re.compile(".*\(\d+-")
        pattern2 = re.compile(".*T\d")

        if not self.db.brandLinkIsPresentInDatabase(ver[1]) \
                and (pattern1.match(str(versionName)) or pattern2.match(str(versionName))):
            self.db.insertVersionToDatabase(count, item[0], model[0], ver[0], ver[1])
            return 1
        else:
            return 0
開發者ID:madamczak,項目名稱:cardata,代碼行數:13,代碼來源:AllegroBrandsCollector.py

示例2: test_normalizes_power

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
 def test_normalizes_power(self):
     toNormalize = u"200KM"
     self.assertEqual(DataCleaning.normalize(toNormalize), "200km")
開發者ID:madamczak,項目名稱:cardata,代碼行數:5,代碼來源:unit_tests.py

示例3: test_normalizes_capacity

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
 def test_normalizes_capacity(self):
     toNormalize = u"1400cm3"
     self.assertEqual(DataCleaning.normalize(toNormalize), "1400cm3")
開發者ID:madamczak,項目名稱:cardata,代碼行數:5,代碼來源:unit_tests.py

示例4: test_normalizes_state

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
 def test_normalizes_state(self):
     toNormalize = u"\n    Używany        \n"
     self.assertEqual(DataCleaning.normalize(toNormalize), "uzywany")
開發者ID:madamczak,項目名稱:cardata,代碼行數:5,代碼來源:unit_tests.py

示例5: test_normalizes_color3

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
 def test_normalizes_color3(self):
     toNormalize = u"\n    Żółty        \n"
     self.assertEqual(DataCleaning.normalize(toNormalize), "zolty")
開發者ID:madamczak,項目名稱:cardata,代碼行數:5,代碼來源:unit_tests.py

示例6: test_normalizes_color2

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
 def test_normalizes_color2(self):
     toNormalize = u"\n    Złoty        \n"
     self.assertEqual(DataCleaning.normalize(toNormalize), "zloty")
開發者ID:madamczak,項目名稱:cardata,代碼行數:5,代碼來源:unit_tests.py

示例7: test_normalizes_color

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
 def test_normalizes_color(self):
     toNormalize = u"\n    Biały        \n"
     self.assertEqual(DataCleaning.normalize(toNormalize), "biay")
開發者ID:madamczak,項目名稱:cardata,代碼行數:5,代碼來源:unit_tests.py

示例8: test_normalizes_year

# 需要導入模塊: from OperationUtils.data_operations import DataCleaning [as 別名]
# 或者: from OperationUtils.data_operations.DataCleaning import normalize [as 別名]
 def test_normalizes_year(self):
     toNormalize = u"\n    2016         \n"
     self.assertEqual(DataCleaning.normalize(toNormalize), "2016")
開發者ID:madamczak,項目名稱:cardata,代碼行數:5,代碼來源:unit_tests.py


注:本文中的OperationUtils.data_operations.DataCleaning.normalize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。