- 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.
- 深入核心的敏捷開發:ThoughtWorks五大關鍵實踐
- Visual C++程序設計學習筆記
- Flutter開發實戰詳解
- SoapUI Cookbook
- Python爬蟲開發:從入門到實戰(微課版)
- C語言程序設計
- jQuery從入門到精通 (軟件開發視頻大講堂)
- Mastering Kali Linux for Web Penetration Testing
- Visual Basic程序設計與應用實踐教程
- 你不知道的JavaScript(中卷)
- C程序設計實踐教程
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- OpenCV with Python By Example
- PrimeFaces Blueprints
- 零代碼實戰:企業級應用搭建與案例詳解