Pandas TimedeltaIndex.join does not accept sort arg

The last pandas 0.20.2 TimedeltaIndex.join method does not accept the "sort = ..." kwarg, so it cannot be used as a join index as required in pandas / core / reshape / merge. py line 722. Here's how to reproduce:

import pandas as pd
import numpy as np
tx = pd.timedelta_range('09:30:00', '10:00:00', freq='30s')
df0 = pd.DataFrame(np.random.randn(len(tx), 3), index=tx, columns=['a','b','c'])
df1 = pd.DataFrame(np.random.randn(len(tx), 2), index=tx, columns=['d','e'])
df0.join(df1)

      

The exception is:

/opt/anaconda/lib/python2.7/site-packages/pandas/core/reshape/merge.pyc in _get_join_info(self)

720             join_index, left_indexer, right_indexer = \
721                 left_ax.join(right_ax, how=self.how, return_indexers=True,
--> 722                              sort=self.sort)
723         elif self.right_index and self.how == 'left':
724             join_index, left_indexer, right_indexer = \

TypeError: join() got an unexpected keyword argument 'sort'

      

Version 0.19.2 works fine. Is this a bug or something else?

+3


source to share


1 answer


This is a known issue. There is a problem report ( here ) and a Pull request that is being executed ( here ) hoping to complete for 0.20.3

Update:



The fix did it ( 0.20.3 )

+1


source







All Articles