python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Pandas - Moving Average without current row values
I have a pandas dataframe
date
product
quant
2021-11-01
a
234
2021-11-01
b
837
2021-12-01
a
930
2022-01-01
a
362
2022-01-01
b
859
2022-02-01
a
2022-02-01
b
2022-03-01
a
2022...
Elizabeth
Votes: 0
Answers: 1
How to calculate new column with sum of moving time window within a group in snwoflake SQL?
I have a table like this:
date
ID
count
2021-01-01
A
24
2021-01-02
A
10
2021-01-03
A
5
2021-01-04
A
1
2021-01-01
B
5
2021-01-02
B
10
2021-01-03
B
1
2021-01-04
B
10
2021-01-01
C...
FAMG
Votes: 0
Answers: 2
Trigger Point of Moving average crossover
I am trying to define the trigger point when wt1(Moving average 1) crosses over wt2(moving average 2) and add it to the column ['side'].
So basically add 1 to side at the moment wt1 crosses above wt2....
ABE
Votes: 0
Answers: 1
Weekly Sample Moving Average
I am trying to get the data from yahoo finance (yfinance) and calculate the simple moving average(SMA) but it only works for daily data instead of weekly data. Daily data of SMA returned calculated SM...
Ma Kurties
Votes: 0
Answers: 1