I was learning from the book "Introduction to Data Science" by Laura Igual.
Whenever I try to execute this code, my jupyter notebook keeps showing '[*]' but never shows the desired output. Even my laptop starts to slow down and get choppy. The file is a CSV file with 26 columns and 10000 rows. Is it because the file is too large ?
import pandas as pd
import numpy as np
file_name = r"ACCIDENTS_GU_BCN_2013.csv"
file = open(file_name, "r")
data = pd.read_csv(file)
data['Date']= data[u'Dia de mes'].apply(lambda x: str(x))+'-'+
data[u'Mes de any'].apply(lambda x: str(x))
data['Date'] = pd.to_datetime(data['Date'])
accidents = data.groupby(['Date']).size()
print(accidents.mean())