Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 340c98b

Browse files
committedApr 13, 2017
CLN/COMPAT: IntervalIndex
1 parent 74162aa commit 340c98b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3211
-3065
lines changed
 

‎asv_bench/benchmarks/indexing.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,26 @@ def time_is_monotonic(self):
226226
self.miint.is_monotonic
227227

228228

229+
class IntervalIndexing(object):
230+
goal_time = 0.2
231+
232+
def setup(self):
233+
self.monotonic = Series(np.arange(1000000),
234+
index=IntervalIndex.from_breaks(np.arange(1000001)))
235+
236+
def time_getitem_scalar(self):
237+
self.monotonic[80000]
238+
239+
def time_loc_scalar(self):
240+
self.monotonic.loc[80000]
241+
242+
def time_getitem_list(self):
243+
self.monotonic[80000:]
244+
245+
def time_loc_list(self):
246+
self.monotonic.loc[80000:]
247+
248+
229249
class PanelIndexing(object):
230250
goal_time = 0.2
231251

‎doc/source/api.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,27 @@ Categorical Components
14051405
CategoricalIndex.as_ordered
14061406
CategoricalIndex.as_unordered
14071407

1408+
.. _api.intervalindex:
1409+
1410+
IntervalIndex
1411+
-------------
1412+
1413+
.. autosummary::
1414+
:toctree: generated/
1415+
1416+
IntervalIndex
1417+
1418+
IntervalIndex Components
1419+
~~~~~~~~~~~~~~~~~~~~~~~~
1420+
1421+
.. autosummary::
1422+
:toctree: generated/
1423+
1424+
IntervalIndex.from_arrays
1425+
IntervalIndex.from_tuples
1426+
IntervalIndex.from_breaks
1427+
IntervalIndex.from_intervals
1428+
14081429
.. _api.multiindex:
14091430

14101431
MultiIndex

0 commit comments

Comments
 (0)
Please sign in to comment.