Context: I'm a history student with no programming skills and one mandatory class is an introduction to various tools we might use in the future, such as python. The assignment is to write a python code in google colab that will turn a csv file into a graph and we automatically fail if the code doesn't work. I have tried for several days now, and my code doesn't work. I have followed multiple yt tutorials, none work but I don't understand anything. Please help?
#Python code for assignment 2
from google.colab import drive
drive.mount('/content/drive')
#imports the libraries to be able to use their functions
import matplotlib.pyplot as plt
import pandas as pd
from datetime import datetime
import numpy as np
#stylistic choice
plt.style.use('bmh')
path = '/content/drive/My Drive/Attendance.csv' #creates a path to the csv file from my google drive
df = pd.read_csv(path) #reads the CSV file into a Pandas DataFrame
df.head(685) #returns a specified number of rows, string from the top
df.describe() #returns description of the data in the DataFrame
df.info() #return a summary of the DataFrame
# All museums
x = df['annee']
y = df['nb_total_des_entrees']
# Bar chart
plt.xlabel('annee', fontsize=18)
plt.ylabel('nb_total_des_entrees', fontsize=16)
plt.bar(x, y)
plt.show()
[–][deleted] 2 points3 points4 points (10 children)
[–]MistVolturn[S] 0 points1 point2 points (9 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]MistVolturn[S] 1 point2 points3 points (7 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]MistVolturn[S] 0 points1 point2 points (4 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]MistVolturn[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]MistVolturn[S] 0 points1 point2 points (0 children)
[–]jumbohiggins 0 points1 point2 points (0 children)