我有一个包含两个索引列(time_secs和session)和 20metric_*个浮点值列的表。
这里有一个小样本:
sqlite> SELECT time_secs, session, metric_1, metric_1_likelihood, metric_2, metric_2_likelihood FROM full_ts LIMIT 10;
time_secs session metric_1 metric_1_likelihood metric_2 metric_2_likelihood
---------- ---------- ------------------ ------------------- ----------------- -------------------
1572522600 session_0 0.0698785211320749 0.424853512805612 0.494699869796956 0.962915383990865
1572522900 session_0 0.760571893135022 0.294675049990505 0.580396389327591 0.934424555702509
1572523200 session_0 0.629603845787639 0.806491332113479 0.16589472228813 0.963243379341578
1572523500 session_0 0.0571856086488497 0.605895821260498 0.910067195100557 0.480348834963859
1572523800 session_0 0.840306423849594 0.54489589788877 0.352571588765252 0.160847342139792
1572524100 session_0 0.681384243040651 0.528022904478869 0.047929896649995 0.572242594863986
1572524400 session_0 0.349861113535551 0.788712196665348 0.010245146069704 0.548463092362831
1572524700 session_0 0.150289974958309 0.511662214212664 0.60765291353699 0.178207027680503
1572525000 session_0 0.495015984152799 0.0217641427448981 0.564055630347545 0.652345164013304
1572525300 session_0 0.608194881163176 0.065551216982212 0.938749939090523 0.682270932390147
sqlite>
对于每个指标列,我希望行数大于某个值。
在熊猫中,我可以做类似的事情:
In [5]: df = df.set_index(['time_secs', 'session'])
但我需要它使用 sqlite。
慕妹3242003
拉莫斯之舞
MMMHUHU
相关分类