当前位置: 首页>>代码示例>>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;未经允许,请勿转载。