python - AttributeError with an outer join in pandas 0.15.1 -
in [26]: xyz = temp_val_ns.join(temp_ref_ns, how='outer') traceback (most recent call last): file "<ipython-input-26-e10ed4b1946b>", line 1, in <module> xyz = temp_val_ns.join(temp_ref_ns, how='outer') file "c:\anaconda\lib\site-packages\pandas\core\frame.py", line 3867, in join rsuffix=rsuffix, sort=sort) file "c:\anaconda\lib\site-packages\pandas\core\frame.py", line 3881, in _join_compat suffixes=(lsuffix, rsuffix), sort=sort) file "c:\anaconda\lib\site-packages\pandas\tools\merge.py", line 39, in merge return op.get_result() file "c:\anaconda\lib\site-packages\pandas\tools\merge.py", line 187, in get_result join_index, left_indexer, right_indexer = self._get_join_info() file "c:\anaconda\lib\site-packages\pandas\tools\merge.py", line 260, in _get_join_info left_ax.join(right_ax, how=self.how, return_indexers=true) file "c:\anaconda\lib\site-packages\pandas\core\index.py", line 1729, in join elif self.is_monotonic , other.is_monotonic: file "c:\anaconda\lib\site-packages\pandas\core\index.py", line 577, in is_monotonic return self._engine.is_monotonic_increasing attributeerror: 'pandas.index.int64engine' object has no attribute 'is_monotonic_increasing'
i didn't have problems in 0.15 might related this change. curious if having similar problems , if there workaround it. in advance.
edit: adding in reproducible example.
aaa = {'bbot_sampler_ref': {1413180063086001221: true, 1413180063086915835: true, 1413180063086998237: true, 1413180063087746824: true, 1413180063089530483: true}, 'bw_ref': {1413180063086001221: 128.04550264550264, 1413180063086915835: 128.04553191489362, 1413180063086998237: 128.04559139784948, 1413180063087746824: 128.04556756756756, 1413180063089530483: 128.04492822966506}} temp_ref_ns = pd.dataframe(aaa) bbb = { 'agg': {1413180063080171210: 1, 1413180063080280537: 1, 1413180063080365279: 1, 1413180063080440876: 1, 1413180063080514973: 1}, 'last_trade': {1413180063080171210: 150.75, 1413180063080280537: 150.75, 1413180063080365279: 150.75, 1413180063080440876: 150.75, 1413180063080514973: 150.75}, 'mid': {1413180063080171210: 150.745, 1413180063080280537: 150.745, 1413180063080365279: 150.745, 1413180063080440876: 150.745, 1413180063080514973: 150.745}, 'pcap_seq': {1413180063080171210: 17613, 1413180063080280537: 17615, 1413180063080365279: 17617, 1413180063080440876: 17619, 1413180063080514973: 17621}, 'timestamp': {1413180063080171210: 1413180063080171210, 1413180063080280537: 1413180063080280537, 1413180063080365279: 1413180063080365279, 1413180063080440876: 1413180063080440876, 1413180063080514973: 1413180063080514973}} temp_val_ns = pd.dataframe(bbb)
then, fail error above:
xyz = temp_val_ns.join(temp_ref_ns, how='outer')
worked me in 0.15.1. error receiving because updated source didn't recompile (if 'manually' installed code), function called is_monotonic_increasing
new in 0.15.1.
in [11]: temp_ref_ns out[11]: bbot_sampler_ref bw_ref 1413180063086001221 true 128.045503 1413180063086915835 true 128.045532 1413180063086998237 true 128.045591 1413180063087746824 true 128.045568 1413180063089530483 true 128.044928 in [12]: temp_val_ns out[12]: agg last_trade mid pcap_seq timestamp 1413180063080171210 1 150.75 150.745 17613 1413180063080171210 1413180063080280537 1 150.75 150.745 17615 1413180063080280537 1413180063080365279 1 150.75 150.745 17617 1413180063080365279 1413180063080440876 1 150.75 150.745 17619 1413180063080440876 1413180063080514973 1 150.75 150.745 17621 1413180063080514973 in [13]: temp_val_ns.join(temp_ref_ns, how='outer') out[13]: agg last_trade mid pcap_seq timestamp bbot_sampler_ref bw_ref 1413180063080171210 1 150.75 150.745 17613 1.413180e+18 nan nan 1413180063080280537 1 150.75 150.745 17615 1.413180e+18 nan nan 1413180063080365279 1 150.75 150.745 17617 1.413180e+18 nan nan 1413180063080440876 1 150.75 150.745 17619 1.413180e+18 nan nan 1413180063080514973 1 150.75 150.745 17621 1.413180e+18 nan nan 1413180063086001221 nan nan nan nan nan true 128.045503 1413180063086915835 nan nan nan nan nan true 128.045532 1413180063086998237 nan nan nan nan nan true 128.045591 1413180063087746824 nan nan nan nan nan true 128.045568 1413180063089530483 nan nan nan nan nan true 128.044928
Comments
Post a Comment