Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修正ts.get_k_data #348

Merged
merged 1 commit into from
Apr 18, 2017
Merged

修正ts.get_k_data #348

merged 1 commit into from
Apr 18, 2017

Conversation

Suckhard
Copy link
Contributor

例如ts.get_k_data(code='601206',start='2015-11-01'),如果不加这个判断,会抛异常说data没有date属性(因为data为空DataFrame)
实际上你不需要抛异常,只用把这个空的df返回即可

#例如ts.get_k_data(code='601206',start='2015-11-01'),如果不加这个判断,会抛异常说data没有date属性(因为data为空DataFrame)
实际上你不需要抛异常,只用把这个空的df返回即可
@@ -676,7 +676,8 @@ def get_k_data(code=None, start='', end='',
ignore_index=True)
if ktype not in ct.K_MIN_LABELS:
if ((start is not None) & (start != '')) & ((end is not None) & (end != '')):
data = data[(data.date >= start) & (data.date <= end)]
if data.empty==False:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not data.empty

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They serve the same purpose.
Do we need to use English in forking this Chinese project? I am a newbie, so please kindly inform me. Thanks.

@jimmysoa jimmysoa merged commit 0f19588 into waditu:master Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants