gzipped
This commit is contained in:
@@ -117,6 +117,9 @@ def repair_data(verbose=False):
|
||||
def rdata(file,rower=rrower()):
|
||||
try:
|
||||
res = rrdata(file,rower=rower)
|
||||
except IOError:
|
||||
try:
|
||||
res = rrdata(file+'.gz',rower=rower)
|
||||
except IOError:
|
||||
res = 0
|
||||
|
||||
@@ -271,6 +274,17 @@ def smalldataprep(therows,xparam,yparam1,yparam2):
|
||||
try:
|
||||
rowdata = dataprep(rrdata(f1).df)
|
||||
|
||||
rowdata = pd.DataFrame({xparam: rowdata[xparam],
|
||||
yparam1: rowdata[yparam1],
|
||||
yparam2: rowdata[yparam2],
|
||||
'distance': rowdata['distance'],
|
||||
'spm': rowdata['spm'],
|
||||
}
|
||||
)
|
||||
df = pd.concat([df,rowdata],ignore_index=True)
|
||||
except IOError:
|
||||
try:
|
||||
rowdata = dataprep(rrdata(f1+'.gz').df)
|
||||
rowdata = pd.DataFrame({xparam: rowdata[xparam],
|
||||
yparam1: rowdata[yparam1],
|
||||
yparam2: rowdata[yparam2],
|
||||
|
||||
@@ -81,6 +81,9 @@ def timedeltaconv(x):
|
||||
def rdata(file,rower=rrower()):
|
||||
try:
|
||||
res = rrdata(file,rower=rower)
|
||||
except IOError:
|
||||
try:
|
||||
res = rrdata(file+'.gz',rower=rower)
|
||||
except IOError:
|
||||
res = 0
|
||||
|
||||
@@ -211,6 +214,17 @@ def smalldataprep(therows,xparam,yparam1,yparam2):
|
||||
try:
|
||||
rowdata = dataprep(rrdata(f1).df)
|
||||
|
||||
rowdata = pd.DataFrame({xparam: rowdata[xparam],
|
||||
yparam1: rowdata[yparam1],
|
||||
yparam2: rowdata[yparam2],
|
||||
'distance': rowdata['distance'],
|
||||
'spm': rowdata['spm'],
|
||||
}
|
||||
)
|
||||
df = pd.concat([df,rowdata],ignore_index=True)
|
||||
except IOError:
|
||||
try:
|
||||
rowdata = dataprep(rrdata(f1+'.gz').df)
|
||||
rowdata = pd.DataFrame({xparam: rowdata[xparam],
|
||||
yparam1: rowdata[yparam1],
|
||||
yparam2: rowdata[yparam2],
|
||||
|
||||
@@ -38,6 +38,9 @@ def send_confirm(u,name,link):
|
||||
def rdata(file,rower=rrower()):
|
||||
try:
|
||||
res = rrdata(file,rower=rower)
|
||||
except IOError:
|
||||
try:
|
||||
res = rrdata(file+'.gz',rower=rower)
|
||||
except IOError:
|
||||
res = 0
|
||||
|
||||
|
||||
@@ -130,6 +130,9 @@ def error403_view(request):
|
||||
def rdata(file,rower=rrower()):
|
||||
try:
|
||||
res = rrdata(file,rower=rower)
|
||||
except IOError:
|
||||
try:
|
||||
res = rrdata(file+'.gz',rower=rower)
|
||||
except IOError:
|
||||
res = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user