0
I have the following problem, I received a database in csv file and I need to analyze this data, but it has a lot of columns with the same name and I wanted to know if you have any way to treat these columns without changing the file itself, just manipulating the dataframe.
Code to generate dataframe:
import pandas as pd
base = pd.read_csv('Final_behavior_study_results.csv')
How the columns appear:
# | Describe your experience | what is the feeling in this photo? | what is the feeling in this photo? | what is the feeling in this photo? | Start Date | Submite Date | Network ID
You can rename all columns by passing a list with the new names, for example:
df.columns = ["col1", "col2"]
– AlexCiuffa
Thiago, good morning! If they have the same name it may be interesting to pivot your DF. If you want to make the csv file available, we can get a better idea of what it is. Hug!
– lmonferrari