Last active
June 25, 2019 01:47
-
-
Save korkridake/e6c8ab7ad7deb985c5eb89249dc9d3fd to your computer and use it in GitHub Desktop.
Import Standard Libraries
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
| ####################################################################### | |
| # Load standard libraries | |
| ####################################################################### | |
| import os | |
| import pandas as pd | |
| import numpy as np | |
| import tqdm | |
| import warnings | |
| warnings.filterwarnings('ignore') | |
| from glob import glob | |
| from IPython.core.interactiveshell import InteractiveShell | |
| InteractiveShell.ast_node_interactivity = "all" | |
| %config Completer.use_jedi = False | |
| pd.options.display.max_rows = 999 | |
| pd.options.display.max_columns = 999 | |
| pd.options.display.float_format = '{:20,.2f}'.format | |
| from IPython.core.display import display, HTML | |
| display(HTML("<style>.container { width:90% !important; }</style>")) | |
| ####################################################################### | |
| # Load machine learning | |
| ####################################################################### | |
| from sklearn.model_selection import train_test_split | |
| from sklearn.preprocessing import Imputer | |
| from sklearn.ensemble import RandomForestRegressor | |
| from sklearn.ensemble import GradientBoostingRegressor | |
| from sklearn.metrics import mean_squared_error, mean_absolute_error | |
| from sklearn.pipeline import make_pipeline | |
| ####################################################################### | |
| # Load data visualizations | |
| ####################################################################### | |
| %config InlineBackend.figure_format = 'retina' # Set as High-Definition (HD) Image | |
| # matplotlib | |
| import matplotlib.pyplot as plt | |
| %matplotlib inline | |
| # seaborn | |
| import seaborn as sns; | |
| sns.set(style="whitegrid", color_codes=True) | |
| # bokeh | |
| from bokeh.plotting import figure, output_file, show | |
| # spotify chartify | |
| # https://github.com/spotify/chartify | |
| # altair | |
| import altair as alt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment