我是Python.I的新手,我有两个数据帧,分别是june_df和july_df。列是相同的,只是值不同。Index 62 is the starting point of july_df. How can I concat the column('quantity'), and make it consistent(shown in red cicrles)
发布于 2020-07-19 11:19:15
我建议将一个数据帧中的qunatity
列重命名为quantity
列。如果你在拼接之前做,之后就不会有任何问题了。
您可以使用pandas.DataFrame.rename()
方法重命名列,如下所示:
my_df = my_df.rename({'qunatity': 'quantity'}, axis=1)
https://stackoverflow.com/questions/62979470
复制