python 运行 pd.to_stata 报错
代码如下:
df.to_stata( r'E:\CN\out.dta', version=119)
jupyter notebook报错为:
ValueError: Column
date
cannot be exported.
Only string-like object arrays
containing all strings or a mix of strings and None can be exported.
Object arrays containing only null values are prohibited. Other object
types cannot be exported and must first be converted to one of the
supported types.
其中,date为日期。
请问,如何调整代码,以使可以输出为 dta 数据?