pandas concat ignore_index doesn't work

前端 未结 4 547
误落风尘
误落风尘 2020-12-04 11:06

I am trying to column-bind dataframes and having issue with pandas concat, as ignore_index=True doesn\'t seem to work:

df1 = pd.Dat         


        
4条回答
  •  我在风中等你
    2020-12-04 11:45

    The ignore_index option is working in your example, you just need to know that it is ignoring the axis of concatenation which in your case is the columns. (Perhaps a better name would be ignore_labels.) If you want the concatenation to ignore the index labels, then your axis variable has to be set to 0 (the default).

提交回复
热议问题