Pandas DataFrame concat vs append

后端 未结 4 1303
盖世英雄少女心
盖世英雄少女心 2020-11-28 03:36

I have a list of 4 pandas dataframes containing a day of tick data that I want to merge into a single data frame. I cannot understand the behavior of concat on my timestamps

4条回答
  •  佛祖请我去吃肉
    2020-11-28 04:12

    Pandas concat vs append vs join vs merge

    • Concat gives the flexibility to join based on the axis( all rows or all columns)

    • Append is the specific case(axis=0, join='outer') of concat

    • Join is based on the indexes (set by set_index) on how variable =['left','right','inner','couter']

    • Merge is based on any particular column each of the two dataframes, this columns are variables on like 'left_on', 'right_on', 'on'

提交回复
热议问题