'How to create equation from the imported xy co-ordinates using python?

I have an excel file with the xy coordinates and I want to import them and create an equation using python. I know how to import coordinates and turn them into graph but how do I create an equation out of it. picture below show the coordinates. capacity is x and power is y. let me know if I should provide more detail.

coordinates



Solution 1:[1]

You should split your question into separate pieces:

  1. To read a piece of the excel file, you will do well with the pandas Python package, specially with the read_excel() function.
  2. To plot the data (turn what you call "equation", which is just a list of pairs of values, into a graph) you can resort to pandas's plot.line.

In general, try to decompose your question into smaller ones, which have probably been answered before!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ibarrond