-
Notifications
You must be signed in to change notification settings - Fork 8
/
16_libraries.py
51 lines (34 loc) · 1.29 KB
/
16_libraries.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Libraries contain code that is not loaded in the default
# namespace. Some are part of the standard Python
# distribution. To use them, we must import them, but only
# import what you need!
import math # many useful math functions
import random # functions for random numbers/operations
import re # regular expression library
import os # operating system functions
import json # javascript object notation library
# You can find all of them here:
# https://docs.python.org/3/library/
# Anaconda contains many additional libraries that we will be
# using
# The natural language toolkit, contains many NLP functions
import nltk
# Library for plotting information
import matplotlib
# Library for data munging and visualization
import pandas
# The NumbersPython library, useful for scientific computing
import numpy
# You can find all of them here:
# https://docs.anaconda.com/anaconda/packages/pkg-docs
# Aliases. Sometimes you will want to use an alias to import
# a library
# Do this so you only have to type pd in your code, not pandas
import pandas as pd
# Important individual module. Sometimes you don't need the
# whole library:
from matplotlib import pyplot # Import only the pyplot module
# You can combine this:
from matplotlib import pyplot as plt
# Also:
import matplotlib.pyplot as plt