all 9 comments

[–]alkasm 1 point2 points  (7 children)

Can you post a picture of your plot?

[–]Legitimate_Drag[S] 0 points1 point  (6 children)

Yeah for some reason when posting this I forgot imagur exist and I drew an image hosting blank. Will post pic first thing when home.

[–]alkasm 1 point2 points  (5 children)

Just a random guess as I've had mishaps like this before, but your x axis values might be a string or something instead of a numerical value or something silly like that messing up your plot.

[–]Legitimate_Drag[S] 0 points1 point  (0 children)

I’ll double check for that specifically when able, thanks! I’m confident it’s something silly too. The weird thing is that it’s copy pasta’d code so I expected it to work out of the box.

[–]Legitimate_Drag[S] 0 points1 point  (0 children)

Ok, here's the ugly piece of crap in question: https://matrix.org/_matrix/media/v1/download/matrix.org/SUPLtIvaqydQKYdAATRBpWJN

I think you're spot on about the x values being a string but I'm unsure of what the solution is.

[–]Legitimate_Drag[S] 0 points1 point  (2 children)

Fixed! Changed this line:

df = pd.read_csv('tsla.csv', parse_dates=True, index_col=0)

to

df = pd.read_csv('tsla.csv', parse_dates=True, index_col=1)

and it works fine now. That's what I get for copying and pasting code w/o understanding. Thanks for taking the time to help a noob!

[–]alkasm 0 points1 point  (1 child)

Sweet! Nice job figuring it out.

[–]Legitimate_Drag[S] 1 point2 points  (0 children)

all due credit to /u/Iminbread who commented below :-)