Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Python Pandas how to calculate the average of multiple DataFrame?
There is a list of several dataframes of the same type with the same dates.
import pandas as pd
dfs=[
pd.DataFrame([['2020-08-13','John', 30],
['2020-08-14','John', 20],
['2020-08-15','John', 35]],
columns=['id','name', 'value']),
pd.DataFrame([['2020-08-13','Mike', 10],
['2020-08-14','Mike', 25],
['2020-08-15','Mike', 5]],
columns=['id','name', 'value']),
pd.DataFrame([['2020-08-13','Ken', 8],
['2020-08-14','Ken', 17],
['2020-08-15','Ken', 10]],
columns=['id','name', 'value'])
]
pd.DataFrame([['2020-08-13','mean', среднее на дату],
['2020-08-14','mean', среднее на дату],
['2020-08-15','mean', среднее на дату]],
columns=['id','name', 'value'])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question