python - How do I append an existing column to another column, aligning with the indices? -


I have three dataframes that have different columns, but all of them are index and same lines (exact An index). How do I add them to a single data frame, put each column apart, but when I get into the index?

Currently, when I try to connect them together, I get NaN and the same index is repeated. I have created an empty dataframe so that I can put all three dataframes in the appendix. Maybe it's wrong?

What I am doing is as follows:

df = df in df = pd.DataFrame () list of three data frames for frames = x: The append (x)

The dataframe contains the method that In fact it does have to change your code in a bit, so that instead of the empty account you are calling the real dataframe method.

  df = pd dataframe () for frames = three of the three dataframes: df = x.join (df)  

.


Comments