Guest User

Untitled

a guest
Feb 6th, 2016
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. # Merge all the coin frames into one, we populate the list first with Namecoin as it is the largest, by doing this
  2. # all sequencial merges will be of smaller size ie we don't loose any data
  3.  
  4. data2['merged'] = data2['Namecoin']
  5.  
  6. for coin in coins:
  7. data2['merged'] = pd.merge(left=data2['merged'],right=data2[coin], left_on='timestamp', right_on='timestamp', how='left')
  8.  
  9. MemoryError Traceback (most recent call last)
  10. <ipython-input-16-a3fff37d9a9c> in <module>()
  11. 5
  12. 6 for coin in coins:
  13. ----> 7 data2['merged'] = pd.merge(left=data2['merged'],right=data2[coin], left_on='timestamp', right_on='timestamp', how='left')
  14.  
  15. C:\Python27\lib\site-packages\pandas\tools\merge.pyc in merge(left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, copy, indicator)
  16. 33 right_index=right_index, sort=sort, suffixes=suffixes,
  17. 34 copy=copy, indicator=indicator)
  18. ---> 35 return op.get_result()
  19. 36 if __debug__:
  20. 37 merge.__doc__ = _merge_doc % '\nleft : DataFrame'
  21.  
  22. C:\Python27\lib\site-packages\pandas\tools\merge.pyc in get_result(self)
  23. 208 [(ldata, lindexers), (rdata, rindexers)],
  24. 209 axes=[llabels.append(rlabels), join_index],
  25. --> 210 concat_axis=0, copy=self.copy)
  26. 211
  27. 212 typ = self.left._constructor
  28.  
  29. C:\Python27\lib\site-packages\pandas\core\internals.pyc in concatenate_block_managers(mgrs_indexers, axes, concat_axis, copy)
  30. 4454 copy=copy),
  31. 4455 placement=placement)
  32. -> 4456 for placement, join_units in concat_plan]
  33. 4457
  34. 4458 return BlockManager(blocks, axes)
  35.  
  36. C:\Python27\lib\site-packages\pandas\core\internals.pyc in concatenate_join_units(join_units, concat_axis, copy)
  37. 4551 to_concat = [ju.get_reindexed_values(empty_dtype=empty_dtype,
  38. 4552 upcasted_na=upcasted_na)
  39. -> 4553 for ju in join_units]
  40. 4554
  41. 4555 if len(to_concat) == 1:
  42.  
  43. C:\Python27\lib\site-packages\pandas\core\internals.pyc in get_reindexed_values(self, empty_dtype, upcasted_na)
  44. 4836 for ax, indexer in self.indexers.items():
  45. 4837 values = com.take_nd(values, indexer, axis=ax,
  46. -> 4838 fill_value=fill_value)
  47. 4839
  48. 4840 return values
  49.  
  50. C:\Python27\lib\site-packages\pandas\core\common.pyc in take_nd(arr, indexer, axis, out, fill_value, mask_info, allow_fill)
  51. 785 out = np.empty(out_shape, dtype=dtype, order='F')
  52. 786 else:
  53. --> 787 out = np.empty(out_shape, dtype=dtype)
  54. 788
  55. 789 func = _get_take_nd_function(arr.ndim, arr.dtype, out.dtype,
  56.  
  57. MemoryError:
Advertisement
Add Comment
Please, Sign In to add comment