摘要:
方法一:self.方法名(参数列表) 说明,参数列表中不需要self,也可以没有参数列表 self.方法名() 方法二:类名.方法名(self, 参数列表) 说明,也可以没有参数列表 类名.方法名(self) class Student(object): school = 'JiaLiDun Uni 阅读全文
摘要:
日K线到周K线和月K线,如果用resample函数,最大的问题是时间会自动填补。 周线,我们只需要到星期五,他会填补到星期天的日期。 月线,我们只需要月底最后一个交易日,他会填补到月底最后一天的日期。 花了很多时间,找了很多资料,最终的解决办法如下 Copy your index as column 阅读全文
摘要:
# 新建文本文档,并复制内容,保存。修改文件后缀为“.vbs”。即可双击运行 dim program program="程序路径" set Wshell=CreateObject("Wscript.Shell") set oexec=Wshell.Exec(program) Wshell.Run " 阅读全文
摘要:
To solve the requests "ConnectionError: Max retries exceeded with url", use a Retry object and specify how many connection-related errors to retry on 阅读全文
摘要:
使用内置函数vars(): #testvar未定义 In [1]: 'testvar' in vars() Out[1]: False #定义testvar In [2]: testvar=1 In [3]: 'testvar' in vars() Out[3]: True 使用内置函数dir(): 阅读全文