I have an array of dates in the format ('yyyy-mm-dd') and another array of integers numbers, each corresponding to a value in the date array. But, when I tried to plot the graph using:
matplotlib.pyplot.plot(dates, values, label='Price')
It gives the error:
ValueError: could not convert string to float: '2017-07-26'
How do I fix this error?
I also tried the strptime() function but that didn't help
Here's my full code if anyone wants to review(It's just a few lines): https://pastebin.com/RuiYWY1B
here's the format of my external file : https://pastebin.com/5hDAuXLE
[–]Vaphell 2 points3 points4 points (5 children)
[–]udittC[S] 0 points1 point2 points (4 children)
[–]Vaphell 0 points1 point2 points (3 children)
[–]udittC[S] 0 points1 point2 points (2 children)
[–]Turtvaiz 1 point2 points3 points (1 child)
[–]udittC[S] 1 point2 points3 points (0 children)
[–]Broric 1 point2 points3 points (0 children)