Closed wangwwno1 closed 3 years ago
@TSC21 Hello, I just post a PR to fix a bug in ulog concat function, but I don't have the privilege to merge it. Could you review this PR and, if that is OK, merge it into the master branch? Thanks!
Thanks! Looks good to me.
Situation: The original implementation use
TimedeltaIndex
as the index of DataFrame. However, the default index name ofTimedeltaIndex
is"timestamp"
, which is duplicate with the column index. Using an index that exist in both index and column will raise aValueError
, aspandas
cannot infer which axis is the user refer to. For details please refer to issue #40Solution: In this patch I copy the original DataFrame, set the source index to
None
before calling thesort_values
andmerge_asof
function. This would resolve the duplication problem without modify thetimestamp
column index.