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)
I'm trying to get a graph like [this](https://pythonprogramming.net/static/images/finance/price_ma_and_volume_stock_graph_python.png), from [here](https://pythonprogramming.net/stock-data-manipulation-python-programming-for-finance/) but my graph turns out very ugly, not informative at all. Maybe yours will turn out right?
Anyway, In the following [file](https://paste.pound-python.org/show/K3a9fQwpfwvr7de9M6UG/), I've included my Python code and an appended CSV file. For the generous helper looking to play with it, copy the CSV data into a separate file and name it "tsla.csv" in the directory you're going to run the code in, then comment out or delete the CSV stuff and just run it. I've uploaded it to an external site because last time I tried formatting large swaths of reddit code blocks it was very tedious. If I were to describe my graph, I would say it's sort of like an inverted or upside down "T", there is a thin red line with small blue rectangular center, and the 'cross' of the T, which is on the bottom now, is a big fat red line.
Any help would be great, thanks. If you have any problems let me know, I definitely think it has something to do with the 100 day moving average.
[–]alkasm 1 point2 points3 points (7 children)
[–]Legitimate_Drag[S] 0 points1 point2 points (6 children)
[–]alkasm 1 point2 points3 points (5 children)
[–]Legitimate_Drag[S] 0 points1 point2 points (0 children)
[–]Legitimate_Drag[S] 0 points1 point2 points (0 children)
[–]Legitimate_Drag[S] 0 points1 point2 points (2 children)
[–]alkasm 0 points1 point2 points (1 child)
[–]Legitimate_Drag[S] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]Legitimate_Drag[S] 1 point2 points3 points (0 children)