r/pythonhelp • • Nov 01 '20

Cvs file and scatter plot

3 Upvotes

6 comments sorted by

1

u/socal_nerdtastic Nov 01 '20

WTF? Did you have a question?

1

u/420cowb1tch69 Nov 01 '20

lol what

1

u/socal_nerdtastic Nov 01 '20

Random screenshots of code? Why did you post that?

1

u/420cowb1tch69 Nov 01 '20

i accidentally put the question below and not as the title

1

u/420cowb1tch69 Nov 01 '20

yes lol i was wondering how to scatter plot the month and principal balance using thw cvs file as reference

2

u/socal_nerdtastic Nov 01 '20

Using matplotlib?

from matplotlib import pyplot as plt

months = [row[0] for row in list1] # guessing
balance = [row[1] for row in list1]

plt.scatter(months, balance)
plt.show()