Hello I have the following dataframes:
  df = 
    x val 
    1 5 
    2 10
    5 3
and
  df1 = 
    x val 
    1 2 
    3 4
    4 8
    5 2
I would like to a dataframe that returns the average in the same x.
  df2 = 
    x val 
    1 3.5
    2 10
    3 4
    4 8
    5 2.5