Skip to content

Commit

Permalink
fix #12 interpolate with DatetimeTZBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
xoolive committed Mar 1, 2019
1 parent 50bbc48 commit 9b85af8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions traffic/core/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@

# fmt: on

# fix https://github.com/xoolive/traffic/issues/12
# if pd.__version__ <= "0.24.1":
from pandas.core.internals import Block, DatetimeTZBlock
DatetimeTZBlock.interpolate = Block.interpolate


def _split(data: pd.DataFrame, value, unit) -> Iterator[pd.DataFrame]:
diff = data.timestamp.diff().values
Expand Down

0 comments on commit 9b85af8

Please sign in to comment.