import tushare as ts
df = ts.get_hist_data('sh600016',start='2016-06-23',end='2018-12-30')
当我运行上面的代码时,出现ValueError: No JSON object could be decoded这个错误。
这个问题出现的原因不是很明了,但是解决的方法很奇特,竟然是因为whitespace missing after ','修改如下,在start之前和end之前加一个空格符:
df = ts.get_hist_data('sh600016', start='2016-06-23', end='2018-12-30')