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


Python DataFrameClient.get_list_series方法代碼示例

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


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

示例1: _search_db

# 需要導入模塊: from influxdb.influxdb08 import DataFrameClient [as 別名]
# 或者: from influxdb.influxdb08.DataFrameClient import get_list_series [as 別名]
 def _search_db(self,series_name):
     '''
     Search the db name for a series name
     '''
     for db in self.db_list:
         temp_db = DataFrameClient(self.url, self.port, self.user, self.password, db)
         if series_name in temp_db.get_list_series():
             return db
     
     return None
開發者ID:haomen,項目名稱:PlayData,代碼行數:12,代碼來源:InfluxQuery.py

示例2: test_list_series

# 需要導入模塊: from influxdb.influxdb08 import DataFrameClient [as 別名]
# 或者: from influxdb.influxdb08.DataFrameClient import get_list_series [as 別名]
 def test_list_series(self):
     response = [
         {
             'columns': ['time', 'name'],
             'name': 'list_series_result',
             'points': [[0, 'seriesA'], [0, 'seriesB']]
         }
     ]
     with _mocked_session('get', 200, response):
         cli = DataFrameClient('host', 8086, 'username', 'password', 'db')
         series_list = cli.get_list_series()
         self.assertEqual(series_list, ['seriesA', 'seriesB'])
開發者ID:MatijaB,項目名稱:influxdb-python,代碼行數:14,代碼來源:dataframe_client_test.py

示例3: DataFrameClient

# 需要導入模塊: from influxdb.influxdb08 import DataFrameClient [as 別名]
# 或者: from influxdb.influxdb08.DataFrameClient import get_list_series [as 別名]
                 ]

processed_list = [
                  [ 'wage_lag_15m', 'mlag(wage_us_yoy,15)' ],
                  [ 'zillow_median_sale_price_15m', 'mlag(zillow_median_sale_price_yoy,15)' ],
                  ]

df = DataFrameClient('localhost',8086,'root','root')
if({'name':'Econ'} not in df.get_list_database()):
    df.create_database('Econ')
df.switch_database('Econ')

#add all items in interested list
start = timeit.default_timer()
for item in interest_list:
    if item[0] in df.get_list_series():
        df.delete_series(item[0])
    results = influx_Fred.interpret(item[1])
    results = results.replace(to_replace='NaN',value='.')
    results = DataFrame({'value':results['value']})
    df.write_points({item[0]:results})
    print item
print 'total time in seconds: %.2f' % (timeit.default_timer() - start)

#add all items in processed list
start = timeit.default_timer()
influx_Econ = InfluxDB(db_name='Econ')
for item in processed_list:
    if item[0] in df.get_list_series():
        df.delete_series(item[0])
    results = influx_Econ.interpret(item[1])
開發者ID:haomen,項目名稱:PlayData,代碼行數:33,代碼來源:USData.py

示例4: QuandlAPI

# 需要導入模塊: from influxdb.influxdb08 import DataFrameClient [as 別名]
# 或者: from influxdb.influxdb08.DataFrameClient import get_list_series [as 別名]
'''
Created on Jul 8, 2015

@author: shaunz
'''

from QuandlAPI import QuandlAPI
from influxdb.influxdb08 import DataFrameClient
from QuandlTicker import Quandl_ticker_list
import timeit

quandl = QuandlAPI()
df = DataFrameClient('localhost', 8086, 'root', 'root')
if({'name':'Quandl'} not in df.get_list_database()):
    df.create_database('Quandl')

df.switch_database('Quandl')

for series in df.get_list_series():
    df.delete_series(series)

start = timeit.default_timer()
for item in Quandl_ticker_list:
    results = quandl.get_series(item[1],item[2],item[3])
    results = results.replace(to_replace='NaN',value='.')
    print item
    df.write_points({item[0]:results})
print 'total time in seconds: %.2f' % (timeit.default_timer() - start)
開發者ID:EliteTRADER,項目名稱:FredDB,代碼行數:30,代碼來源:QuandlAPITest.py


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