当你使用python中的pandas库中的.read()方法时,无法对齐数据,如下:
对于强迫症的我,必须得把它弄对齐了才行!
于是乎,在代码行加入以下两列:
pd.set_option('display.unicode.ambiguous_as_wide', True) #处理数据的列标题与数据无法对齐的情况
pd.set_option('display.unicode.east_asian_width', True) #无法对齐主要是因为列标题是中文
最后显示效果如下: