Skip to content

Commit

Permalink
FIX: pandas indexing error
Browse files Browse the repository at this point in the history
pd.Series prefer indexing via searching the index to positional
indexing.  This method will get the first element of any iterable.

It will advance a generater, but they did not work previously anyway.

Closes matplotlib#5550
  • Loading branch information
tacaswell committed Dec 28, 2015
1 parent efdc2bf commit 4d9e25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matplotlib/dates.py
Expand Up @@ -1561,7 +1561,7 @@ def default_units(x, axis):
x = x.ravel()

try:
x = x[0]
x = next(iter(x))
except (TypeError, IndexError):
pass

Expand Down

0 comments on commit 4d9e25b

Please sign in to comment.