如题,使用pandas
读取txt数据时,报如下警告:
D:\Program Files\python3.7\lib\site-packages\pandas\util_decorators.py:311: ParserWarning: Falling back to the ‘python’ engine because the ‘c’ engine does not support skipfooter; you
can avoid this warning by specifying engine=‘python’.
return func(*args, **kwargs)
要不说python友好呢,都直接给出了解决方案,在参数列表添加engine='python'
,如下:
# 报错前
data = pd.read_table("txt.txt", header=None, sep = '\t', skiprows=1, skipfooter=1)
# 报错后
data = pd.read_table("txt.txt", header=None, sep = '\t', skiprows=1, skipfooter=1,engine='python')
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)