Skip to content
Search
Generic filters
Exact matches only

7 setups you should include at the beginning of a data science project | by B. Chen | Jul, 2020

import sys
sys.version
'3.7.6 (default, Jan 8 2020, 13:42:34) n[Clang 4.0.1 (tags/RELEASE_401/final)]'
# Python ≥3.7 is required
import sys
assert sys.version_info >= (3, 7)
import tensorflow as tf
tf.__version__
'2.0.0'
# TensorFlow ≥2.0 is required
import tensorflow as tf
assert tf.__version__ >= "2.0"
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
# Default figure format png
sns.heatmap(df.isnull(),
yticklabels=False,
cbar=False,
cmap='viridis')
default plot looks blurry
%matplotlib inline
%config InlineBackend.figure_format = 'retina' # or 'svg'
sns.heatmap(df.isnull(),
yticklabels=False,
cbar=False,
cmap='viridis')
figure format set to retina or svg
>>> np.random.rand(4)
array([0.83209492, 0.10917076, 0.15798519, 0.99356723])
>>> np.random.rand(4)
array([0.46183001, 0.7523687 , 0.96599624, 0.32349079])
>>> np.random.seed(0)
>>> np.random.rand(4)
array([0.5488135 , 0.71518937, 0.60276338, 0.54488318])
>>> np.random.seed(0)
>>> np.random.rand(4)
array([0.5488135 , 0.71518937, 0.60276338, 0.54488318])
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"