2

It might be duplicate but can`t find the proper question. If so, please, point the link towards it.

pandas 0.25

I have 2 dataframe (df1 and df2), both from pd.read_csv() function, everything by default. The first row is a header, there are Cyrillic and English column names. The df1 has a proper order of columns, df2 is not. Like:

df1 = ['a', 'b', 'c', 'д']

df2 = ['b', 'c', 'a', 'д']

In the case of concat([df1, df2], axis=0), which order of columns will be? It will inherit the order of df1 or df2? Is there any cases (e.g. name of columns), when behavior of the function may change?

Simon Osipov
  • 404
  • 5
  • 18
  • 1
    Not 100% sure, but maybe answer should be [here](https://stackoverflow.com/questions/50501787/python-pandas-user-warning-sorting-because-non-concatenation-axis-is-not-aligne/50501889#50501889) – jezrael Jan 23 '20 at 12:32
  • @jezrael please, post as answer, I found what I have been looking for by your link, I would like to accept it as an answer. – Simon Osipov Jan 23 '20 at 12:51
  • 1
    It should be dupe, so cannot do it :( Be free upvote linked answer – jezrael Jan 23 '20 at 12:52

0 Answers0