Calculate Area Under Curve Given a Set of Coordinates

Hi,

New coder here, so please forgive any rookie mistakes.

I have a data set in Excel consisting of several hundred x and y values based on experimental data. There is no associated function for the resulting curve. The x values do not have a fixed interval (e.g. the x values look like 1, 3, 9, 11, 20, etc; no fixed interval).

I need to calculate the Area Under Curve (AUC) for this dataset.

Based on my internet research I think I can use openpyxl to calculate the AUC. However, I’m not sure how to code it. I found a post on another forum that discusses how to calculate the AUC when the x values have a constant step, but I can’t find anything on how to calculate AUC when the x values don’t have a constant step and when there is no associated function.

I can plot the graph using Excel, but I can’t figure out how to calculate the AUC using Python.

Can anyone help me with the code to import my Excel spreadsheet of X and Y values into Python, and then how to calculate the AUC?

Thanks!