Skip to content

Commit

Permalink
Merge pull request waditu#486 from qytz/master
Browse files Browse the repository at this point in the history
fix ts.cap_tops exception
  • Loading branch information
jimmysoa authored Oct 9, 2017
2 parents 87db129 + 62146ee commit 3a77ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tushare/stock/billboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def cap_tops(days= 5, retry_count= 3, pause= 0.001):
ct._write_head()
df = _cap_tops(days, pageNo=1, retry_count=retry_count,
pause=pause)
df['code'] = df['code'].map(lambda x: str(x).zfill(6))
if df is not None:
df['code'] = df['code'].map(lambda x: str(x).zfill(6))
df = df.drop_duplicates('code')
return df

Expand Down

0 comments on commit 3a77ad2

Please sign in to comment.