Skip to content

conditional aggregation #6616

Discussion options

You must be logged in to vote

Hi @nagydavid, I think you want something like the below. Hope this helps! Let us know if you have any questions/feedback.

Gist for better syntax highlighting: https://gist.github.com/lostmygithubaccount/bf8e60832dd2d8b7b80b4bde1f1c0266

Setup the same data from your example:

[ins] In [1]: import numpy as np
         ...: import pandas as pd
         ...: import random
         ...: from datetime import datetime, timedelta
         ...:
         ...:
         ...: datapoint_values = np.random.randint(0, 100, 60)
         ...: timestamp = pd.date_range(start="2021-01-01 00:00:00", periods=60, freq="180s")
         ...:
         ...: # repeat datapoint_names 20 times
         ...: datapoint_…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@nagydavid
Comment options

@lostmygithubaccount
Comment options

Answer selected by nagydavid
@lostmygithubaccount
Comment options

@nagydavid
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants