Skip to content

Commit ccee299

Browse files
Fixed a bug
1 parent d432de0 commit ccee299

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,8 @@ def viewRevenueGraph():
278278
for i in rev_data.columns:
279279
if year in i:
280280
rev_data = pd.read_csv("data/revenue.csv")
281-
cols = list(rev_data.columns)
282-
for i in cols:
283-
if i[-4:] == year:
281+
for i in rev_data.columns:
282+
if year in i:
284283
months.append(month[int(i[:2])-1])
285284
profits.append(sum(list(rev_data[i])))
286285
plt.scatter(months, profits,color ='red',linewidths=3)
@@ -489,7 +488,7 @@ def Revenue():
489488
while True:
490489
revenueOptionsVisualizer()
491490
option = input("\nEnter your option : ")
492-
if option not in '12349':
491+
if option not in '123459':
493492
print("\n!!!!! Please enter the valid option !!!!!\n")
494493
else:
495494
rev_opt = int(option)

0 commit comments

Comments
 (0)