year():
print("Type '2018' to select the data of 2018")
print("Type '2019' to select the data of 2019")
print("Type '2020' to select the data of 2020")
print("Type '0' to close selection")
,,, def data_frame():
while True:
year()
a=int(input("Select the year:"))
if a == 2018:
csv = pd.read_csv("C:\\\\Users\\\\seena\\\\OneDrive\\\\Desktop\\\\2022-11-18 20.55.00\\\\Project csv BOTH.csv")#importing a csv file
df1=pd.DataFrame(csv)
print(df1)
elif a == 0:
break
else :
print("Invalid choice")
c = input("Press Enter to continue selection") ,,,
i tryed making index as false but its not working for me i also cant seem to find a better way
what i get is :
select the year :2020
output:
0 1 203 283
1 2 376 249
what i want is to get rid of the index or replace it with the month is all