本文整理汇总了Python中sentinelsat.SentinelAPI.to_dataframe方法的典型用法代码示例。如果您正苦于以下问题:Python SentinelAPI.to_dataframe方法的具体用法?Python SentinelAPI.to_dataframe怎么用?Python SentinelAPI.to_dataframe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sentinelsat.SentinelAPI
的用法示例。
在下文中一共展示了SentinelAPI.to_dataframe方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_missing_dependency_dataframe
# 需要导入模块: from sentinelsat import SentinelAPI [as 别名]
# 或者: from sentinelsat.SentinelAPI import to_dataframe [as 别名]
def test_missing_dependency_dataframe(monkeypatch):
api = SentinelAPI("mock_user", "mock_password")
with pytest.raises(ImportError):
monkeypatch.setitem(sys.modules, "pandas", None)
api.to_dataframe({"test":"test"})
with pytest.raises(ImportError):
monkeypatch.setitem(sys.modules, "geopandas", None)
api.to_geodataframe({"test":"tst"})
示例2: test_to_pandas
# 需要导入模块: from sentinelsat import SentinelAPI [as 别名]
# 或者: from sentinelsat.SentinelAPI import to_dataframe [as 别名]
def test_to_pandas(products):
df = SentinelAPI.to_dataframe(products)
assert '44517f66-9845-4792-a988-b5ae6e81fd3e' in df.index
示例3: test_to_pandas_empty
# 需要导入模块: from sentinelsat import SentinelAPI [as 别名]
# 或者: from sentinelsat.SentinelAPI import to_dataframe [as 别名]
def test_to_pandas_empty(products):
df = SentinelAPI.to_dataframe({})
assert type(df).__name__ == 'DataFrame'
assert len(df) == 0
示例4: test_to_pandas
# 需要导入模块: from sentinelsat import SentinelAPI [as 别名]
# 或者: from sentinelsat.SentinelAPI import to_dataframe [as 别名]
def test_to_pandas(products):
df = SentinelAPI.to_dataframe(products)
assert type(df).__name__ == 'DataFrame'
assert len(products) == len(df)
assert set(products) == set(df.index)