- Applied Deep Learning with Python
- Alex Galea Luis Capelo
- 238字
- 2021-08-13 15:53:06
Import the external libraries and set up the plotting environment
- Open up the chapter 1 Jupyter Notebook and scroll to the Python Libraries section.
Just like for regular Python scripts, libraries can be imported into the Notebook at any time. It's best practice to put the majority of the packages you use at the top of the file. Sometimes it makes sense to load things midway through the Notebook and that is completely OK.
- Run the cells to import the external libraries and set the plotting options:
For a nice Notebook setup, it's often useful to set various options along with the imports at the top. For example, the following can be run to change the figure's appearance to something more aesthetically pleasing than the matplotlib and Seaborn defaults:
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
# See here for more options:
https://matplotlib.org/users/customizing.html
%config InlineBackend.figure_format='retina'
sns.set() # Revert to matplotlib defaults
plt.rcParams['figure.figsize'] = (9, 6)
plt.rcParams['axes.labelpad'] = 10
sns.set_style("darkgrid")
So far in this book, we've gone over the basics of using Jupyter Notebooks for data science. We started by exploring the platform and finding our way around the interface. Then, we discussed the most useful features, which include tab completion and magic functions. Finally, we introduced the Python libraries we'll be using in this book.
The next section will be very interactive as we perform our first analysis together using the Jupyter Notebook.
- 數(shù)據(jù)庫(kù)系統(tǒng)原理及MySQL應(yīng)用教程(第2版)
- Learning Single:page Web Application Development
- Java程序設(shè)計(jì)與開(kāi)發(fā)
- 工程軟件開(kāi)發(fā)技術(shù)基礎(chǔ)
- PHP 從入門(mén)到項(xiàng)目實(shí)踐(超值版)
- C++面向?qū)ο蟪绦蛟O(shè)計(jì)(微課版)
- 控糖控脂健康餐
- Mastering Entity Framework
- 碼上行動(dòng):零基礎(chǔ)學(xué)會(huì)Python編程(ChatGPT版)
- QTP自動(dòng)化測(cè)試進(jìn)階
- Bootstrap 4 Cookbook
- FFmpeg開(kāi)發(fā)實(shí)戰(zhàn):從零基礎(chǔ)到短視頻上線(xiàn)
- Practical Predictive Analytics
- 30天學(xué)通C#項(xiàng)目案例開(kāi)發(fā)
- C#程序設(shè)計(jì)基礎(chǔ)入門(mén)教程