{"issue":{"created_at":"2011-12-14T09:48:57Z","state":"open","updated_at":"2011-12-14T09:48:57Z","user":{"gravatar_id":"9a17a2d0bbd5d2883864c74dc866e233","id":807824,"url":"https://api.github.com/users/CRP","avatar_url":"https://secure.gravatar.com/avatar/9a17a2d0bbd5d2883864c74dc866e233?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"CRP"},"comments":0,"body":"In [71]: a=DataFrame(randn(10,2),columns=['a','b'])\r\n\r\nIn [72]: b=DataFrame(randn(10,1),columns=['c']).astype(np.float32)\r\n\r\nIn [73]: a.join(b)\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n/Users/c.prinoth/<ipython-input-73-3163f462d6f9> in <module>()\r\n----> 1 a.join(b)\r\n\r\n/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/pandas/core/frame.pyc in join(self, other, on, how, lsuffix, rsuffix)\r\n   2614             return self._join_on(other, on, how, lsuffix, rsuffix)\r\n   2615         else:\r\n-> 2616             return self._join_index(other, how, lsuffix, rsuffix)\r\n   2617 \r\n   2618     def _join_on(self, other, on, how, lsuffix, rsuffix):\r\n\r\n/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/pandas/core/frame.pyc in _join_index(self, other, how, lsuffix, rsuffix)\r\n   2649 \r\n   2650         # this will always ensure copied data\r\n\r\n-> 2651         merged_data = join_managers(thisdata, otherdata, axis=1, how=how)\r\n   2652         return self._constructor(merged_data)\r\n   2653 \r\n\r\n/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/pandas/core/internals.pyc in join_managers(left, right, axis, how, copy)\r\n   1032 def join_managers(left, right, axis=1, how='left', copy=True):\r\n   1033     op = _JoinOperation(left, right, axis=axis, how=how)\r\n-> 1034     return op.get_result(copy=copy)\r\n   1035 \r\n   1036 class _JoinOperation(object):\r\n\r\n/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/pandas/core/internals.pyc in get_result(self, copy)\r\n   1090             if lblk and rblk:\r\n   1091                 # true merge, do not produce intermediate copy\r\n\r\n-> 1092                 res_blk = self._merge_blocks(lblk, rblk)\r\n   1093             elif lblk:\r\n   1094                 res_blk = self._reindex_block(lblk, side='left')\r\n\r\n/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/pandas/core/internals.pyc in _merge_blocks(self, lblk, rblk)\r\n   1206         else:\r\n   1207             common.take_fast(rblk.values, ridx, None, False,\r\n-> 1208                              axis=self.axis, out=out[lk:])\r\n   1209 \r\n   1210         # does not sort\r\n\r\n\r\n/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/pandas/core/common.pyc in take_fast(arr, indexer, mask, needs_masking, axis, out)\r\n    247         return take_2d(arr, indexer, out=out, mask=mask,\r\n    248                        needs_masking=needs_masking,\r\n--> 249                        axis=axis)\r\n    250 \r\n    251     result = arr.take(indexer, axis=axis, out=out)\r\n\r\n/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/pandas/core/common.pyc in take_2d(arr, indexer, out, mask, needs_masking, axis)\r\n    232             needs_masking = mask.any()\r\n    233 \r\n--> 234         result = arr.take(indexer, axis=axis, out=out)\r\n    235         result = _maybe_mask(result, mask, needs_masking, axis=axis,\r\n    236                              out_passed=out is not None)\r\n\r\nTypeError: array cannot be safely cast to required type\r\n\r\n\r\nIn [77]: a.dtypes\r\nOut[77]: \r\na    float64\r\nb    float64\r\n\r\nIn [78]: b.dtypes\r\nOut[78]: c    float32\r\n","assignee":null,"id":2549380,"number":486,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"exception joining dataframes with different datatypes","html_url":"https://github.com/wesm/pandas/issues/486","closed_at":null,"url":"https://api.github.com/repos/wesm/pandas/issues/486","milestone":null},"action":"opened"}