This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data.replace(to_replace={'column':0}, value=pd.np.nan, inplace=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pandas_profiling import ProfileReport | |
| profile = ProfileReport(data, progress_bar=True) | |
| profile.to_notebook_iframe() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| data = pd.read_csv('path/dataset.csv') # pd.read_excel or pd.read_sas, depending on your file type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import ast | |
| import time | |
| import string | |
| from tqdm import tqdm_notebook | |
| tqdm_notebook() | |
| def files(): | |
| return [t for t in os.listdir(os.curdir) if t.endswith('.txt')] | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python spotify_scraper.py a & | |
| python spotify_scraper.py b & | |
| python spotify_scraper.py c & | |
| python spotify_scraper.py d & | |
| python spotify_scraper.py e & | |
| python spotify_scraper.py f & | |
| python spotify_scraper.py g & | |
| python spotify_scraper.py h & | |
| python spotify_scraper.py i & | |
| python spotify_scraper.py j & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from selenium import webdriver | |
| import string | |
| import time | |
| import os | |
| def main(letter1): | |
| browser = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver') | |
| browser.get(url="https://accounts.spotify.com/fr/login") | |
| time.sleep(3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %matplotlib inline | |
| import pyLDAvis | |
| import pyLDAvis.gensim | |
| vis = pyLDAvis.gensim.prepare(topic_model=lda_model, corpus=corpus, dictionary=dictionary_LDA) | |
| pyLDAvis.enable_notebook() | |
| pyLDAvis.display(vis) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new_text = 'How many species of animals are there in Russia and in the US, and where are the biggest oceans?' | |
| tokens = [stemmer.stem(token) for token in tokenizer.tokenize(new_text.lower()) if token not in stopwords_fr] | |
| lda_model[dictionary_LDA.doc2bow(tokens)] |