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

Write fast OHLC aggregator #152

Closed
wesm opened this issue Sep 17, 2011 · 1 comment · Fixed by #27466
Closed

Write fast OHLC aggregator #152

wesm opened this issue Sep 17, 2011 · 1 comment · Fixed by #27466
Assignees
Labels
Datetime Datetime data dtype Enhancement
Milestone

Comments

@wesm
Copy link
Member

wesm commented Sep 17, 2011

To work with GroupBy

@ghost ghost assigned wesm Apr 5, 2012
@wesm
Copy link
Member Author

wesm commented Apr 5, 2012

speed of current OHLC function can be improved:

def translate_grouping(how):
    if set(how) == set('ohlc'):
        return {'open'  : lambda arr: arr[0],
                'low'   : lambda arr: arr.min(),
                'high'  : lambda arr: arr.max(),
                'close' : lambda arr: arr[-1]}

    if how in 'last':
        def picker(arr):
            return arr[-1] if arr is not None and len(arr) else np.nan
        return picker

    raise ValueError("Unrecognized method: %s" % how)

@wesm wesm closed this as completed in b15ae85 Apr 6, 2012
wesm added a commit that referenced this issue Apr 14, 2012
* timeseries: (200 commits)
  TST: don't use deprecated DateRange
  BUG: fix buglets surfacing from merge
  RLS: set released to false, bump dev version to 0.8.0
  BUG: fix major performance issue in DatetimeIndex.union affecting join performance on irregular indexes, remedying #1046
  ENH: add to_datetime method to Index, close #208
  ENH: legacy time rule support and refactoring, better alias handling. misc tests, #1041
  ENH: to_datetime will convert array of strings and NAs to datetime64 with NaT, close #999
  ENH: more datetime64 integration in core data algorithms per #996, close #1035
  ENH: handle datetime64 in block formation from dict of arrays in DataFrame constructor, close #1037
  BUG: fix broken time_rule usage in legacy DateRange, close #1036
  BUG: name inline method something different
  ENH: initial version of convert_to_annual for pandas, #736
  BUG: convert datetime64 -> datetime.datetime for matplotlib, close #1003
  ENH: integrate cython ohlc in groupby and test, close #152
  ENH: implement Cython OHLC function for groupby #152
  ENH: use cython bin groupers, fix bug in DatetimeIndex.__getitem causing slowness, some timeseries vbenches
  ENH: enable to_datetime to be vectorized, handle NAs, close #858
  TST: interactions between array of datetime objects and DatetimeIndex, bug fixes
  TST: remove errant foo and test_datetime64.py
  TST: moved test_datetime64.py tests to test_timeseries
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant