Hi,
Welcome to the community!
As you noticed, your timestamps are not in a regular period, therefore they won’t be equally spaced. The alternative is to
resample the data and this would do (just pick an appropriate freq
):
df.resample(freq).agg({"Open": "first", "High": "max", "Low": "min", "Close": "last"})
Hope this helps!