Skip to content

Tag: dataframe

Create rolling average pandas

I have a dataset of esports data like this: (done using pd.to_clipboard() I want to create a dataframe that essentially, for each team, every week, creates a rolling X game average of their points scored. (X could be 2, 3, 4, etc). A few notes: This example only shows points, the actual data has about 10 feat…

Merging 2 different DataFrame with different length

I have two DataFrame Consists of time and price columns. I want to create a new DataFrame df3 as the length of df2, and I also want to put df1[‘price’] in it like below Where price1 shows the mean of price1 values for the corresponding time2 values like below I’m sorry if it’s unclear,…