Guest User

Untitled

a guest
Jul 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. client = DataFrameClient(host, port, user, password, dbname)
  2.  
  3. print("Read DataFrame")
  4. AandCStation = client.query("""SELECT * FROM "NoT/machinename" WHERE time >= now() - 12h""")
  5. print(AandCStation)
  6.  
  7. print(type(AandCStation))
  8.  
  9. df = pd.DataFrame(AandCStation)
  10.  
  11. Read DataFrame
  12. defaultdict(<class 'list'>, {'NoT/sensor': MachineName MachineType SensorWorking
  13. 2018-07-16 04:11:19.912895848+00:00 Quench tank Yes
  14. 2018-07-16 04:11:22.961838564+00:00 Quench tank Yes
  15. 2018-07-16 04:11:25.872680626+00:00 Quench tank Yes
  16. 2018-07-16 04:11:28.850205591+00:00 Quench tank Yes
  17. ... ... ... ...
  18. 2018-07-16 16:08:05.188868516+00:00 Quench tank Yes
  19. 2018-07-16 16:08:08.169862344+00:00 Quench tank Yes
  20. 2018-07-16 16:08:11.144413930+00:00 Quench tank Yes
  21. 2018-07-16 16:08:14.126290232+00:00 Quench tank Yes
  22. 2018-07-16 16:08:17.107127232+00:00 Quench tank Yes
  23. 2018-07-16 16:08:20.079248843+00:00 Quench tank Yes
  24.  
  25. TempValue
  26. 2018-07-16 04:09:50.467145647+00:00 32.69
  27. 2018-07-16 04:09:53.888973858+00:00 32.69
  28. 2018-07-16 04:09:55.879811649+00:00 32.69
  29. 2018-07-16 04:09:58.818001127+00:00 32.69
  30. ... ...
  31. 2018-07-16 16:08:05.188868516+00:00 34.19
  32. 2018-07-16 16:08:08.169862344+00:00 34.19
  33. 2018-07-16 16:09:43.209347998+00:00 34.19
  34. 2018-07-16 16:09:46.187872612+00:00 34.19
  35.  
  36. [12233 rows x 4 columns]})
  37. <class 'collections.defaultdict'>
Add Comment
Please, Sign In to add comment