Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concat DataFrames bug with keys on axis=1 #708

Closed
wesm opened this issue Jan 28, 2012 · 0 comments
Closed

concat DataFrames bug with keys on axis=1 #708

wesm opened this issue Jan 28, 2012 · 0 comments
Labels
Milestone

Comments

@wesm
Copy link
Member

wesm commented Jan 28, 2012


In [11]: t1
Out[11]: 
    value
id       
a   1    
b   2    
c   3    

In [12]: t2
Out[12]: 
    value
id       
a   7    
b   8    

In [13]: concat([t1, t2], axis=1, keys=['t1', 't2'])
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
/home/wesm/Dropbox/book/svn/<ipython-input-13-8c00deb927ee> in <module>()
----> 1 concat([t1, t2], axis=1, keys=['t1', 't2'])

/home/wesm/code/pandas/pandas/tools/merge.pyc in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity)
    649                        keys=keys, levels=levels, names=names,
    650                        verify_integrity=verify_integrity)
--> 651     return op.get_result()
    652 
    653 

/home/wesm/code/pandas/pandas/tools/merge.pyc in get_result(self)
    715             return Series(new_data, index=self.new_axes[0], name=name)
    716         else:
--> 717             new_data = self._get_concatenated_data()
    718             return self.objs[0]._from_axes(new_data, self.new_axes)
    719 

/home/wesm/code/pandas/pandas/tools/merge.pyc in _get_concatenated_data(self)
    735                 stacked_block = self._concat_blocks(klass_blocks)
    736                 new_blocks.append(stacked_block)
--> 737             new_data = BlockManager(new_blocks, self.new_axes)
    738         except Exception:  # EAFP
    739             # should not be possible to fail here for the expected reason with


/home/wesm/code/pandas/pandas/core/internals.pyc in __init__(self, blocks, axes, do_integrity_check)
    283 
    284         if do_integrity_check:
--> 285             self._verify_integrity()
    286 
    287     def __nonzero__(self):

/home/wesm/code/pandas/pandas/core/internals.pyc in _verify_integrity(self)
    362 
    363     def _verify_integrity(self):
--> 364         _union_block_items(self.blocks)
    365         mgr_shape = self.shape
    366         for block in self.blocks:

/home/wesm/code/pandas/pandas/core/internals.pyc in _union_block_items(blocks)
   1071 
   1072     if tot_len > len(the_union):
-> 1073         raise Exception('item names overlap')
   1074     return the_union
   1075 

Exception: item names overlap
@wesm wesm closed this as completed Jan 29, 2012
yarikoptic added a commit to neurodebian/pandas that referenced this issue Feb 10, 2012
* commit 'v0.7.0rc1-94-ge3df4e2':
  DOC: added info on encoding parameter for csv i/o
  TST: renamed io b/c module conflict, made suite check for config
  added vbench for write csv
  BUG: made encoding optional on csv read/write, addresses pandas-dev#717
  BUG: float64 hash table for handling NAs in Series.unique, close pandas-dev#714
  TST: add bench_unique.py
  TST: added better testing for pandas-dev#709
  BUG: closes pandas-dev#709, bug in ix + multiindex use case
  DOC: release notes
  BUG: don't assume that each object contains every unique block type in concat, GH pandas-dev#708
  BUG: inconsistency in .ix with integer label and float index
  Fix test that assumed py2.
  Don't use unnecessary UnicodeReader on Python 3.
  BUG: remove poor man's breakpoint
  BUG: closes pandas-dev#705, csv is encoded utf-8 and then decoded on the read side
  updated support contact info
  DOC: note EWMA adjustment, closes pandas-dev#703
  ENH: close pandas-dev#694, pandas-dev#693, pandas-dev#692
  BUG: Bar plot fails if axis parameter supplied, closes pandas-dev#702
dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
Add basic benchmarks for forward pointers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant