Skip to content

Commit 907ca9b

Browse files
committed
fix empty case
1 parent 926939b commit 907ca9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

absbox/local/cf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def readInspect(r:dict) -> pd.DataFrame:
132132
else:
133133
u = pd.DataFrame()
134134

135-
w = r['waterfallInspect'].to_records() if 'waterfallInspect' in r else []
135+
w = r['waterfallInspect'].to_records() if ('waterfallInspect' in r and r['waterfallInspect']) else []
136136
wdf = tz.pipe(tz.groupby(lambda x:tz.nth(2,x), w)
137137
,lambda m: tz.valmap(lambda xs: [ (_[1],_[4]) for _ in xs],m)
138138
,lambda m: tz.valmap(lambda xs: pd.DataFrame(xs, columns =['Date', 'val']).set_index('Date'),m)

0 commit comments

Comments
 (0)