Line 1... |
Line 1... |
1 |
#!/usr/bin/python |
1 |
#!/usr/bin/python |
2 |
|
2 |
|
3 |
import pandas as pd |
3 |
import pandas as pd |
- |
|
4 |
import sys |
4 |
import os |
5 |
import os |
5 |
import time |
6 |
import time |
6 |
import datetime |
7 |
import datetime |
7 |
|
8 |
|
8 |
from pymlab import config |
9 |
from pymlab import config |
Line 56... |
Line 57... |
56 |
# if the day is same like the first one |
57 |
# if the day is same like the first one |
57 |
if time.mktime(datetime.datetime.strptime(first[:8], "%Y%m%d").timetuple()) == time.mktime(datetime.datetime.strptime(file[:8], "%Y%m%d").timetuple()): |
58 |
if time.mktime(datetime.datetime.strptime(first[:8], "%Y%m%d").timetuple()) == time.mktime(datetime.datetime.strptime(file[:8], "%Y%m%d").timetuple()): |
58 |
listOfSpecDataFiles.append(file) |
59 |
listOfSpecDataFiles.append(file) |
59 |
|
60 |
|
60 |
for file in listOfSpecDataFiles: |
61 |
for file in listOfSpecDataFiles: |
61 |
df=pd.read_csv(file, sep=';', header=None) # read current csv |
62 |
df=pd.read_csv(dataSource + file, sep=';', header=None) # read current csv |
62 |
dim=df.shape # gets data file dimensions |
63 |
dim=df.shape # gets data file dimensions |
63 |
rowsInd=dim[0] # maximal index of rows |
64 |
rowsInd=dim[0] # maximal index of rows |
64 |
columnsInd=dim[1] # maximal index of columns |
65 |
columnsInd=dim[1] # maximal index of columns |
65 |
values=pd.DataFrame() # empty DataFrame |
66 |
values=pd.DataFrame() # empty DataFrame |
66 |
|
67 |
|