tianna1121 commented on issue #3169:
URL: https://github.com/apache/iotdb/issues/3169#issuecomment-2232241450
在使用python执行聚合时,调用todf()将结果专为dataframe出现NaN,直接在iotdb的cli中执行输出数据正常。
```
result = session.execute_query_statement("select first_value(p),
last_value(p), max_value(p), min_value(p), sum(q) from root.eth group by
([2024-07-16T14:00:00, 2024-07-16T15:00:00), 60s)")
df = result.todf()
display(df.shape)
display(df.head())
```
输出结果为:
```
(.venv) zy@tradingbot:~/ws/tradingbot/getData$ python testIoTDB.py
(60, 6)
Time first_value(root.eth.p) last_value(root.eth.p)
max_value(root.eth.p) min_value(root.eth.p) sum(root.eth.q)
0 1721109600000 NaN NaN
NaN NaN NaN
1 1721109660000 NaN NaN
NaN NaN NaN
2 1721109720000 NaN NaN
NaN NaN NaN
3 1721109780000 NaN NaN
NaN NaN NaN
4 1721109840000 NaN NaN
NaN NaN NaN
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]