Skip to content

timeseries related .groups bug #1430

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

Closed
changhiskhan opened this issue Jun 8, 2012 · 0 comments
Closed

timeseries related .groups bug #1430

changhiskhan opened this issue Jun 8, 2012 · 0 comments
Milestone

Comments

@changhiskhan
Copy link
Contributor

related to #1423

from pandas import *                                                                                  
import numpy as np                                                                                    
periods = 1000                                                                                        
ind = DatetimeIndex(start='2012/1/1', freq='5min', periods=periods)                                   
df = DataFrame({'high': np.arange(periods), 'low': np.arange(periods)}, index=ind)                    

grouped = df.groupby(lambda x: datetime(x.year, x.month, x.day))      



In [9]: grouped.groups

ValueError                                Traceback (most recent call last)
<ipython-input-9-aec229cf123a> in <module>()
----> 1 grouped.groups

~/pandas/pandas/core/groupby.pyc in groups(self)
    150     @property
    151     def groups(self):
--> 152         return self.grouper.groups
    153 
    154     @property

~/pandas/pandas/core/index.pyc in groupby(self, to_groupby)
    740 
    741     def groupby(self, to_groupby):
--> 742         return self._groupby(self.values, to_groupby)
    743 
    744     def map(self, mapper):

...
...
...

~/pandas/pandas/lib.so in pandas.lib.groupby_arrays (pandas/src/tseries.c:67246)()

ValueError: Buffer dtype mismatch, expected 'int64_t' but got Python object
@wesm wesm closed this as completed in 72fb8c6 Jun 8, 2012
yarikoptic added a commit to neurodebian/pandas that referenced this issue Jun 21, 2012
* commit 'v0.8.0b1-137-gf733f10': (119 commits)
  ENH: make any/all conform to sum/mean interface. Fixed bug in copy keyword in BlockManager.get_numeric_data pandas-dev#1416
  TST: mixed case
  ENH: DataFrame any all pandas-dev#1416
  BLD: ujson fix compiler warnings
  BUG: ujson memory alignment fixes
  BUG: ujson don't compare pointers outside their allocated blocks
  ujson check for malloc success
  Add dependency on pytz
  ENH: check the periods argument is a number pandas-dev#1438
  BUG: fix DatetimeIndex.groupby bug close pandas-dev#1430
  ENH: set_xlim using str for irregular index pandas-dev#1427
  BUG: isin method buggy on SparseSeries pandas-dev#1412
  BUG: pass on limit argument in upsampling, close pandas-dev#1424
  ENH: implement comparison methods on Factor, close pandas-dev#1405
  BUG: fix numpy 1.6 erroneous type-casting bug causing NumPy 1.7 issues, close pandas-dev#1396
  BUG: fix Series .ix bug and test failure described in pandas-dev#1396
  DOC: Indicate that to_csv and from_csv methods can handle string file path and file-like objects for io.
  BUG: fix a number of negative ordinal bugs, check for out-of-range quarters
  BUG: preserve name in PeriodIndex.to_timestamp
  BUG: fix asfreq bug on PeriodIndex
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants