Skip to content

Instantly share code, notes, and snippets.

# we define the list of stopwords in english
stopwords = nltk.corpus.stopwords.words('english')
# we compute the phrases present in each review
phrases_stream = [transform_sentence_in_phrases(review) for review in reviews]
# we visualize the elements present in the first review (index 0 of the list)
phrases_stream[0]
import time
import requests
items_to_scrape = ['https://en.wikipedia.org/wiki/Madrid', 'https://en.wikipedia.org/wiki/Munich', 'https://en.wikipedia.org/wiki/Valencia']
for item in items_to_scrape:
response = requests.get(item)
###
### your code
###
# check brains available
env.brain_names
# ['BananaBrain']
# select first brain
brain_name = env.brain_names[0]
# set it as the brain we will be controlling from python
brain = env.brains[brain_name]
# list with columns names
list(df.columns)
# ['Id','District Name','Neighborhood Name','Street','Weekday','Month','Day','Hour','Part of the day','Mild injuries','Serious injuries','Victims','Vehicles involved','Longitude','Latitude']
art_movement = df.groupby(['art_movement']).mean()
art_movement.average_rating