Интеграция Python с фреймом данных PandasPython

Программы на Python
Anonymous
Интеграция Python с фреймом данных Pandas

Сообщение Anonymous »


У меня есть следующий кадр данных pandas with 2 columns, which looks like:

Код: Выделить всё

0  0
1. 22
2. 34
3. 21
4. 21
5. 92
I would like to integrate the area under this curve if we were to plot the first columns as the x-axis and the second column as the y-axis. I have tried doing this using the integrated module from (

Код: Выделить всё

from scipy import integrate
), and applied as follows as I have seen in examples online:

Код: Выделить всё

print(df.integrate)
However, it seems the integrate function does not work. I'm receiving the error:

Dataframe object has no attribute integrate

How would I go about this?
Thank you


Источник: https://stackoverflow.com/questions/672 ... -dataframe

Вернуться в «Python»