i am using python 3.8, after use join or merge, my dataframe columns auto changes to (column name,) How could i fix it? i tried to use join, merge, and concat but it return the same result :((
here is some images about it
df_us_ed_songs_pos[0]
both of them have save index is Date
. after i use join, it become like this
df_temp.join(df_us_ed_songs_pos[0])
all name columns of df_temp
has changed. Anyone know how to fix it? thanks
hmmm, now i can see that df_temp
columns seem wrong, but i checked name_us_ed_songs
and it seem normal?
CodePudding user response:
You could update the column names by using a list comprehension
and taking off first and last char, like this:
df_temp.columns = [col[1:-1] for col in df_temp.columns]