Skip to content

support time_weighted functions #872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Jasmine-ge
Copy link
Contributor

PR checklist:

  • Did you run ClangFormat ?
  • Did you separate headers to a different section in existing community code base ?
  • Did you surround proton: starts/ends for new code in existing community code base ?

Please write user-readable short description of the changes:
close #866

@Jasmine-ge Jasmine-ge requested a review from yl-lisen December 3, 2024 13:12
@Jasmine-ge Jasmine-ge self-assigned this Dec 3, 2024
@Jasmine-ge Jasmine-ge force-pushed the enhancement/issue-866-support-time-weighted-function branch from 0e56b58 to c622510 Compare December 5, 2024 02:52
@Jasmine-ge Jasmine-ge force-pushed the enhancement/issue-866-support-time-weighted-function branch from 2bae2ba to 22733ff Compare December 9, 2024 10:54
@Jasmine-ge Jasmine-ge force-pushed the enhancement/issue-866-support-time-weighted-function branch 4 times, most recently from 8f1c874 to 8327f5d Compare December 17, 2024 07:34
@Jasmine-ge Jasmine-ge force-pushed the enhancement/issue-866-support-time-weighted-function branch from fc5b616 to d09aa4c Compare December 19, 2024 07:38
@Jasmine-ge Jasmine-ge force-pushed the enhancement/issue-866-support-time-weighted-function branch from d09aa4c to 3c564be Compare December 19, 2024 09:24
@Jasmine-ge
Copy link
Contributor Author

New function

_time_weighted(x, timestamp) / _time_weighted(x, timestamp, end_time)

Current only support avg_time_weighted and median_time_weighted

Arguments

x — values to be calculated. [integer, float, decimal]

timestamp — time when each data is collected. [date, date32, datetime, datetime64]

end_time — time used to calculate final value [should be the same datatype as timestamp]
Can be omit, if is omitted than the last value won't be calculated.

@Jasmine-ge Jasmine-ge merged commit 3195dda into develop Dec 20, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

time weighted median / avg in a hop / tumble window
2 participants