Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: Index dtype may not be applied properly #11017
Conversation
sinhrks
added this to the
0.17.0
milestone
Sep 7, 2015
|
pls run perf check on this - |
|
@sinhrks can you see if this affects perf? |
jreback
commented on an outdated diff
Sep 9, 2015
| @@ -114,17 +114,21 @@ def __new__(cls, data=None, dtype=None, copy=False, name=None, fastpath=False, | ||
| if fastpath: | ||
| return cls._simple_new(data, name) | ||
| + if is_categorical_dtype(data) or is_categorical_dtype(dtype): | ||
| + return CategoricalIndex(data, copy=copy, name=name, **kwargs) | ||
| + | ||
| + from pandas.tseries.index import DatetimeIndex |
jreback
Contributor
|
|
Following is a asv result. Will consider a better path.
|
|
this is prob just from the imports (e.g. a Float64Index) doesn't care about Datetimeindex, so the import adds the extra time (or the check for the import anyhow) |
|
@jreback Thanks, suggested changes improve perf a little. I assume other slowness is caused by
|
|
master (this is
this branch
will merge in a bit, thanks @sinhrks |
|
Wow, great. Thanks! |
|
merged via ead3ca8 (my change in another commit) thanks! I don't believe we had an issue assosicated, correct? |
jreback
closed this
Sep 11, 2015
sinhrks
referenced
this pull request
Sep 11, 2015
Closed
BUG/ENH: Passing explicit dtype should delegate to appropriate Index subclass (if available) #5196
|
Though this was based on gitter chat, #5196 refers to the same issue. Closed. |
sinhrks
deleted the
sinhrks:index_dtype branch
Sep 11, 2015
|
@sinhrks awesome thanks! |
sinhrks commentedSep 7, 2015
Fixed 2 problems:
dtypeis not applied to other iterables.categoryto ndarray-like results inTypeError