I have two unevenly spaced timeseries:
time X1
1234567000 96.32
1234567005 96.01
1234567009 96.05
time X2
1234567001 23.88
1234567005 23.96
I would like to merge them:
time X1 X2
1234567000 96.32 nan
1234567001 nan 23.88
1234567005 96.01 23.96
1234567009 96.05 nan
How can I do so in Python? I'm open to using packages, e.g. pandas.
time
is integer (It isn't a UNIX timestamp). X1
and X2
are float.