python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Rolling and keep the threshold
I have a database in pandas with a date and a variable. I need to compare the values of the variable with its next three days and if any of its values are increased with respect to the initial value, ...
Luisa Fernanda Velasquez Camac
Votes: 0
Answers: 1
Pandas rolling removes imaginary part of complex... defect or feature?
Pandas rolling appears only to return the real part of complex values...
Am I missing something?
a=np.array([[1+0j,2+0j,3+0j],[4j,5j,10+6j]])
pd.DataFrame(a.T).rolling(3).apply(lambda x: print(x) is N...
alps
Votes: 0
Answers: 1
Python - subtraction inside rolling window
I need to make subtractions inside red frames as [20-10,60-40,100-70]
that results in [10,20,30]
Current code makes subtractions but I don't know how to define red frames
seq = [10, 20, 40, 60, 7...
leonardik
Votes: 0
Answers: 2
Pandas returns incorrect groupby rolling sum of zeros for float64 when having many groups
When doing groupby rolling in pandas with dtype float64, sum of zeros become an arbitrary small float when number of groups is large. For example,
import pandas as pd
import numpy as np
np.random.see...
Tim
Votes: 0
Answers: 1