使用数据分析工具
使用流行的数据分析工具来分析存储在InfluxDB数据库中的时序数据。
pandas
使用pandas Python数据分析库来分析和可视化存储在InfluxDB Clustered中的时序数据。
...
dataframe = reader.read_pandas()
dataframe = dataframe.set_index('time')
print(dataframe.index)
resample = dataframe.resample("1H")
resample['temp'].mean()
PyArrow
使用PyArrow来读取和分析InfluxDB查询结果。
...
table = client.query(
'''SELECT *
FROM home
WHERE time >= now() - INTERVAL '90 days'
ORDER BY time'''
)
table.group_by('room').aggregate([('temp', 'mean')])
这个页面有帮助吗?
感谢您的反馈!