If I have a csv with 4 columns: how can I average the values of one column (x) over the average of another column (y) by grouping through the first one with panda? I have to do a loop for every value of the first column? I am not sure about the implementation.
For example, if I have a csv file:
a,1,2,4
a,2,2,5
a,3,2,6
a,4,2,5
b,1,3,2
b,2,3,3
b,3,3,4
and I want a plot with a,average(3rd column) and b,average(3rd column)
I have to do something like:
df=pd.reas_csv
x=group_by("values of the 1st column").average()
I would also try to plot kde over the 2nd column, which has ten rows for every group of the first column. I don't understand how to group data from *csv file without a header in particular.
Thank you for the help.
