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


Python common.file_path_to_url方法代碼示例

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


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

示例1: test_file_url

# 需要導入模塊: from pandas.io import common [as 別名]
# 或者: from pandas.io.common import file_path_to_url [as 別名]
def test_file_url(self):
        url = self.banklist_data
        dfs = self.read_html(file_path_to_url(os.path.abspath(url)),
                             'First',
                             attrs={'id': 'table'})
        assert isinstance(dfs, list)
        for df in dfs:
            assert isinstance(df, DataFrame) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:10,代碼來源:test_html.py

示例2: test_regex_idempotency

# 需要導入模塊: from pandas.io import common [as 別名]
# 或者: from pandas.io.common import file_path_to_url [as 別名]
def test_regex_idempotency(self):
        url = self.banklist_data
        dfs = self.read_html(file_path_to_url(os.path.abspath(url)),
                             match=re.compile(re.compile('Florida')),
                             attrs={'id': 'table'})
        assert isinstance(dfs, list)
        for df in dfs:
            assert isinstance(df, DataFrame) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:10,代碼來源:test_html.py

示例3: test_file_url

# 需要導入模塊: from pandas.io import common [as 別名]
# 或者: from pandas.io.common import file_path_to_url [as 別名]
def test_file_url(self):
        url = self.banklist_data
        dfs = self.read_html(file_path_to_url(url), 'First', attrs={'id': 'table'})
        tm.assert_isinstance(dfs, list)
        for df in dfs:
            tm.assert_isinstance(df, DataFrame) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:8,代碼來源:test_html.py

示例4: test_regex_idempotency

# 需要導入模塊: from pandas.io import common [as 別名]
# 或者: from pandas.io.common import file_path_to_url [as 別名]
def test_regex_idempotency(self):
        url = self.banklist_data
        dfs = self.read_html(file_path_to_url(url),
                                 match=re.compile(re.compile('Florida')),
                                 attrs={'id': 'table'})
        tm.assert_isinstance(dfs, list)
        for df in dfs:
            tm.assert_isinstance(df, DataFrame) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:10,代碼來源:test_html.py

示例5: get_elements_from_file

# 需要導入模塊: from pandas.io import common [as 別名]
# 或者: from pandas.io.common import file_path_to_url [as 別名]
def get_elements_from_file(url, element='table'):
    _skip_if_none_of(('bs4', 'html5lib'))
    url = file_path_to_url(url)
    from bs4 import BeautifulSoup
    with urlopen(url) as f:
        soup = BeautifulSoup(f, features='html5lib')
    return soup.find_all(element) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:9,代碼來源:test_html.py

示例6: test_file_url

# 需要導入模塊: from pandas.io import common [as 別名]
# 或者: from pandas.io.common import file_path_to_url [as 別名]
def test_file_url(self):
        url = self.banklist_data
        dfs = self.read_html(file_path_to_url(url), 'First',
                             attrs={'id': 'table'})
        assert isinstance(dfs, list)
        for df in dfs:
            assert isinstance(df, DataFrame) 
開發者ID:securityclippy,項目名稱:elasticintel,代碼行數:9,代碼來源:test_html.py

示例7: test_regex_idempotency

# 需要導入模塊: from pandas.io import common [as 別名]
# 或者: from pandas.io.common import file_path_to_url [as 別名]
def test_regex_idempotency(self):
        url = self.banklist_data
        dfs = self.read_html(file_path_to_url(url),
                             match=re.compile(re.compile('Florida')),
                             attrs={'id': 'table'})
        assert isinstance(dfs, list)
        for df in dfs:
            assert isinstance(df, DataFrame) 
開發者ID:securityclippy,項目名稱:elasticintel,代碼行數:10,代碼來源:test_html.py


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