This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index | datetime | Pressure | Sea-Level Pressure | Precipitation | Temperature | Relative Humidity | Sunlight Hours | Day/Night | |
---|---|---|---|---|---|---|---|---|---|
0 | 2020-10-01 00:10:00 | 1006.5 | 1009.3 | 19.6 | 82 | Night | |||
1 | 2020-10-01 00:20:00 | 1006.6 | 1009.4 | 19.5 | 82 | Night | |||
2 | 2020-10-01 00:30:00 | 1006.7 | 1009.5 | 19.6 | 81 | Night | |||
3 | 2020-10-01 00:40:00 | 1006.9 | 1009.7 | 19.6 | 82 | Night | |||
4 | 2020-10-01 00:50:00 | 1006.9 | 1009.7 | 19.7 | 82 | Night | |||
5 | 2020-10-01 01:00:00 | 1007.1 | 1009.9 | 19.5 | 83 | Night | |||
6 | 2020-10-01 01:10:00 | 1007.0 | 1009.8 | 19.5 | 83 | Night | |||
7 | 2020-10-01 01:20:00 | 1006.7 | 1009.5 | 19.2 | 84 | Night | |||
8 | 2020-10-01 01:30:00 | 1006.7 | 1009.5 | 19.2 | 84 | Night |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import apache_beam as beam | |
from apache_beam.testing.test_stream import TestStream | |
from apache_beam.transforms.userstate import CombiningValueStateSpec | |
from apache_beam.transforms.window import TimestampedValue | |
# Stateful DoFn, based on: | |
# - https://beam.apache.org/blog/stateful-processing/ | |
# - https://github.com/apache/beam/blob/30f9a607509940f78459e4fba847617399780246/sdks/python/apache_beam/transforms/userstate_test.py | |
class IndexAssigningStatefulDoFn(beam.DoFn): |
OlderNewer