I have a dataframe with with multiple rows similar to the one showed below:
wave cross cross2
0 299.0 1.25 3.30
1 299.5 1.30 4.20
2 300.0 1.45 4.36
3 300.5 1.65 4.32
4 300.8 1.56 4.56
What I want to do is to average the data for the same wavelengths so that is get a data frame with wave as an integer, which results in something like this:
wave cross cross2
0 299 1.30 3.75
1 300 1.55 4.41
what is the best way to achieve this with python pandas?