Skip to content

Conversation

@fredrik-1
Copy link

Solves #20592 and I doubt that there are any cases when a key string should be split by list()

@WillAyd
Copy link
Member

WillAyd commented Apr 5, 2018

This needs tests

@codecov
Copy link

codecov bot commented Apr 5, 2018

Codecov Report

Merging #20615 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #20615 +/- ## ========================================== + Coverage 91.82% 91.84% +0.02%  ========================================== Files 153 153 Lines 49256 49258 +2 ========================================== + Hits 45227 45243 +16  + Misses 4029 4015 -14
Flag Coverage Δ
#multiple 90.23% <100%> (+0.02%) ⬆️
#single 41.9% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/series.py 93.91% <100%> (+0.01%) ⬆️
pandas/util/testing.py 84.73% <0%> (+0.2%) ⬆️
pandas/plotting/_converter.py 66.81% <0%> (+1.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d610a4...9535274. Read the comment docs.

@TomAugspurger TomAugspurger added the Indexing Related to indexing on series/frames, not to indexes themselves label Apr 5, 2018
@TomAugspurger TomAugspurger added this to the 0.23.0 milestone Apr 5, 2018
except Exception:
pass

if not isinstance(key, (list, Series, np.ndarray, Series)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like extra Series listed here.


if not isinstance(key, (list, Series, np.ndarray, Series)):
try:
key = list(key)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's break this if up to specificy target a string e.g.

if isinstance(key, compat.string_types): ...... elif not isinstance(key, (list, Series, np.ndarray)): .... 
@jreback jreback removed this from the 0.23.0 milestone Apr 5, 2018
@jreback
Copy link
Contributor

jreback commented Sep 25, 2018

closing as stale, though would certainly take a PR here

@jreback jreback closed this Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Indexing Related to indexing on series/frames, not to indexes themselves

4 participants