IA369Z - Reprodutibilidade em Pesquisa Computacional.

Leitura de informações do arquivo CSV

Descrição de códigos para devices e coletas

  • Code Client Device
  • ESP8266 Runing program language LUA.

In [4]:
import numpy as np

In [5]:
import csv

In [8]:
with open('data/leitura1.csv', 'rb') as csvfile:
    spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
    for row in spamreader:
        print ', '.join(row)


created_at,entry_id,field1
2016-11-25, 00:23:26, UTC,326,3300
2016-11-25, 00:23:52, UTC,327,3299
2016-11-26, 00:08:20, UTC,328,3300
2016-11-28, 18:30:29, UTC,329,3292
2016-11-29, 10:15:40, UTC,330,3296
2016-11-29, 13:04:11, UTC,331,3296
2016-11-29, 14:09:49, UTC,332,3296
2016-11-29, 23:39:02, UTC,333,3292
2016-11-30, 00:03:23, UTC,334,3292
2016-11-30, 20:25:31, UTC,335,3292
2016-11-30, 21:48:13, UTC,336,3294
2016-11-30, 22:17:36, UTC,337,3293
2016-12-01, 17:00:28, UTC,338,3292
2016-12-01, 20:17:44, UTC,339,3295
2016-12-01, 20:27:36, UTC,340,3286
2016-12-01, 21:14:27, UTC,341,3293
2016-12-01, 22:17:04, UTC,342,3292
2016-12-01, 22:21:03, UTC,343,3292
2016-12-01, 22:44:30, UTC,344,3292
2016-12-01, 22:56:25, UTC,345,3292
2016-12-02, 19:04:09, UTC,346,3292
2016-12-06, 19:48:10, UTC,347,3284
2016-12-06, 23:25:15, UTC,348,3281
2016-12-07, 16:56:05, UTC,349,3279
2016-12-07, 18:15:17, UTC,350,3282
2016-12-07, 18:17:02, UTC,351,3282
2016-12-10, 22:24:19, UTC,352,3278
2016-12-11, 01:48:49, UTC,353,3277
2016-12-15, 14:39:10, UTC,354,3262
2016-12-15, 14:39:39, UTC,355,3253
2016-12-15, 21:14:43, UTC,356,3260
2016-12-15, 21:29:06, UTC,357,3260
2016-12-15, 21:30:29, UTC,358,3260
2016-12-15, 21:32:50, UTC,359,3260
2016-12-15, 21:56:16, UTC,360,3261
2016-12-15, 21:57:00, UTC,361,3257
2016-12-15, 22:13:21, UTC,362,3260
2016-12-15, 22:13:49, UTC,363,3258
2016-12-15, 23:38:13, UTC,364,3260
2016-12-17, 20:56:04, UTC,365,3257
2016-12-17, 21:08:44, UTC,366,3260
2016-12-18, 00:07:14, UTC,367,3258
2016-12-18, 22:06:33, UTC,368,3256
2016-12-19, 13:51:52, UTC,369,3256
2016-12-20, 17:08:13, UTC,370,3249
2016-12-20, 18:59:22, UTC,371,3256
2016-12-20, 20:31:57, UTC,372,3256
2016-12-20, 21:35:37, UTC,373,3259
2016-12-20, 21:48:48, UTC,374,3256
2016-12-21, 17:05:12, UTC,375,3256
2016-12-21, 21:40:31, UTC,376,3256
2016-12-28, 01:24:25, UTC,377,3249
2016-12-28, 15:16:16, UTC,378,3230
2016-12-28, 15:16:48, UTC,379,3230
2017-01-06, 22:49:19, UTC,380,3238
2017-01-07, 14:31:19, UTC,381,3238
2017-01-07, 15:32:59, UTC,382,3234
2017-01-07, 17:33:27, UTC,383,3238
2017-01-07, 20:02:41, UTC,384,3230
2017-01-08, 16:04:56, UTC,385,3222
2017-01-08, 20:07:52, UTC,386,3211
2017-01-08, 21:49:05, UTC,387,3237
2017-01-08, 22:49:15, UTC,388,3238
2017-01-10, 20:37:57, UTC,389,3238
2017-01-10, 21:02:21, UTC,390,3238
2017-01-10, 21:08:35, UTC,391,3238
2017-01-10, 21:27:09, UTC,392,3237
2017-01-10, 21:30:44, UTC,393,3238
2017-01-10, 21:35:02, UTC,394,3236
2017-01-10, 21:51:12, UTC,395,3235
2017-01-11, 21:06:39, UTC,396,3236
2017-01-11, 21:25:03, UTC,397,3235
2017-01-12, 13:07:17, UTC,398,3231
2017-01-12, 13:07:51, UTC,399,3230
2017-01-12, 18:47:26, UTC,400,3230
2017-01-12, 18:48:13, UTC,401,3230
2017-01-12, 18:49:18, UTC,402,3230
2017-01-12, 20:56:32, UTC,403,3230
2017-01-14, 11:15:14, UTC,404,3226
2017-01-14, 11:15:42, UTC,405,3226
2017-01-22, 22:19:29, UTC,406,3206
2017-01-23, 21:13:22, UTC,407,3204
2017-01-23, 21:18:54, UTC,408,3207
2017-01-23, 21:28:57, UTC,409,3205
2017-01-24, 21:20:48, UTC,410,3204
2017-01-24, 21:32:20, UTC,411,3203
2017-01-24, 21:40:18, UTC,412,3204
2017-01-25, 18:41:05, UTC,413,3204
2017-01-26, 16:29:37, UTC,414,3197
2017-01-26, 21:59:48, UTC,415,3203
2017-01-27, 00:49:57, UTC,416,3202
2017-01-29, 18:10:08, UTC,417,3191
2017-01-31, 22:47:38, UTC,418,3192
2017-02-01, 23:25:51, UTC,419,3196
2017-02-01, 23:26:15, UTC,420,3190
2017-02-02, 21:42:21, UTC,421,3190
2017-02-04, 12:00:49, UTC,422,3189
2017-02-04, 14:04:45, UTC,423,3187
2017-02-04, 15:29:49, UTC,424,3196
2017-02-04, 15:45:48, UTC,425,3196



In [7]:
with open('/data/database.csv', 'rb') as csvfile:
    spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
    for row in spamreader:
        print ', '.join(row)


---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-7-085200be5c1d> in <module>()
----> 1 with open('/data/database.csv', 'rb') as csvfile:
      2     spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
      3     for row in spamreader:
      4         print ', '.join(row)

IOError: [Errno 2] No such file or directory: '/data/database.csv'

In [ ]: