-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Erroneous AssertionError: Index length did not match values on plot #4486
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
Comments
This has shown up in my attempts to fix some of the period index joining ops.. I'll see if I can track it down |
i can't reproduce this with the following code def randts(start, stop, size=1, klass=Series, name=None):
scalar_mapper = pd.Timestamp
start, stop = scalar_mapper(start), scalar_mapper(stop)
mapper = np.vectorize(scalar_mapper)
values = np.random.random_integers(start.asm8.view(int),
stop.asm8.view(int), size=size)
return klass(mapper(values), name=name or rands(10)) n = 13536
index = tm.randts(Timestamp('1/1/2009'), Timestamp('1/1/2012'), size=n,
name='pdgt10', klass=Index)
values = randn(n)
s = Series(values, index=index)
s.plot() I get the following plot: |
I'll try with the commit you're on |
hm it works on that commit... |
Your example works here. Let me put together an example where it fails. |
sorry that plot is not showing up my connection is weird.....public wifi is not always so reliable |
I get all |
ahhh nevermind it should be foo = Series(inactive.pdgt10.values, inactive.st_time.values) |
i can repro with that thanks @fonnesbeck |
Right, sorry! |
strangely (or maybe not) if i sort the index then i get a plot |
maybe the dupe index value are throwing it off |
either way i'll fix |
yep it's the dupe index that is the issue...investigating |
simple reproducible example (using n = 10
index = tm.randts(1, n, size=n * 2, klass=Index)
values = randn(index.size)
s = Series(values, index=index)
s.plot() |
I have what appears to be a valid
Series
with a time series index as follows:Note also:
However, when I try calling
inactive.plot()
in order to get a time series plot, I receive a puzzlingAssertionError
:As I have shown above, my index length and my values are the same length.
Running a recent (<2 weeks) build from master on OS X 10.8.4 and Python 2.7.2.
The text was updated successfully, but these errors were encountered: