Pandas去除行列标题空格
方法1 .去除列标题1. 去除列标题空格df1 = pd.DataFrame([{'col1 ':'a', 'col2 ':1}, {'col1 ':'b', 'col2 ':2}],index=["aa ","bb "])df1 = df1.rename(columns=lambda x: x.strip())print(df1['col1'])2.去除行标题空格df1 = pd....