Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client = DataFrameClient(host, port, user, password, dbname)
- print("Read DataFrame")
- AandCStation = client.query("""SELECT * FROM "NoT/machinename" WHERE time >= now() - 12h""")
- print(AandCStation)
- print(type(AandCStation))
- df = pd.DataFrame(AandCStation)
- Read DataFrame
- defaultdict(<class 'list'>, {'NoT/sensor': MachineName MachineType SensorWorking
- 2018-07-16 04:11:19.912895848+00:00 Quench tank Yes
- 2018-07-16 04:11:22.961838564+00:00 Quench tank Yes
- 2018-07-16 04:11:25.872680626+00:00 Quench tank Yes
- 2018-07-16 04:11:28.850205591+00:00 Quench tank Yes
- ... ... ... ...
- 2018-07-16 16:08:05.188868516+00:00 Quench tank Yes
- 2018-07-16 16:08:08.169862344+00:00 Quench tank Yes
- 2018-07-16 16:08:11.144413930+00:00 Quench tank Yes
- 2018-07-16 16:08:14.126290232+00:00 Quench tank Yes
- 2018-07-16 16:08:17.107127232+00:00 Quench tank Yes
- 2018-07-16 16:08:20.079248843+00:00 Quench tank Yes
- TempValue
- 2018-07-16 04:09:50.467145647+00:00 32.69
- 2018-07-16 04:09:53.888973858+00:00 32.69
- 2018-07-16 04:09:55.879811649+00:00 32.69
- 2018-07-16 04:09:58.818001127+00:00 32.69
- ... ...
- 2018-07-16 16:08:05.188868516+00:00 34.19
- 2018-07-16 16:08:08.169862344+00:00 34.19
- 2018-07-16 16:09:43.209347998+00:00 34.19
- 2018-07-16 16:09:46.187872612+00:00 34.19
- [12233 rows x 4 columns]})
- <class 'collections.defaultdict'>
Add Comment
Please, Sign In to add comment