I have data that looks like this:
Timestamp | Variable A | Variable B | Variable C |
---|---|---|---|
2023-01-01 00:00:00.000 | Value | Nan | Nan |
2023-01-01 00:00:00.050 | Value | Nan | Nan |
2023-01-01 00:00:00.150 | Nan | Value | Value |
2023-01-01 05:00:00.450 | Nan | Value | Value |
2023-01-01 05:00:00.500 | Value | Nan | Nan |
Variable A comes from one source and Variable B and C from a second, so the timestamps are different which gives me a lot of missing data (the data comes from a dozen sources, this is just a simplified example).
I tried to use the resample
method of pandas.
But this method creates too many lines for me, in the example above there would be new lines between 2023-01-01 00:00:00.150 and 2023-01-01 05:00:00.450, which I do not want.
Can you help me? Thank you