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
| import matplotlib.pylab as pl | |
| # Using the numpy.array method to generate two arrays | |
| xs = pl.array([1,2,3,4,5]) | |
| print(type(xs)) | |
| # OUTPUT: | |
| ys = pl.array([5,4,3,2,1]) | |
| # Using the matplotlib.pyplot method to plot our two arrays |
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
| python -m pip install -U matplotlib | |
| pip install numpy |
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
| import numpy as np | |
| import matplotlib.pylot as plt |
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
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # Generating two random arrays of floats | |
| xs = np.random.randn(20) | |
| ys = np.random.randn(20) | |
| # Creating the pyplot, "co": cyan and circles | |
| plt.figure(figsize=(9, 5), dpi = 100) |
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
| # Make sure you have pandas imported first! | |
| # To read from a CSV (Comma-Separated Values) file | |
| csv_data = pd.read_csv("path/to/file/data.csv") | |
| # To read from a JSON (JavaScript Object Notation) file | |
| json_data = pd.read_json("path/to/file/data.json") | |
| # To read from a HTML (Hypertext Markup Language) file | |
| html_data = pd.read_html("path/to/file/data.html") |
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
| pip install numpy | |
| pip install pandas |
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
| import numpy as np | |
| import pandas as pd |
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
| pip install numpy | |
| pip install pandas |
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
| import numpy as np | |
| import pandas as pd |
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
| # Make sure you have pandas imported first! | |
| # To read from a CSV (Comma-Separated Values) file | |
| csv_data = pd.read_csv("path/to/file/data.csv") | |
| # To read from a JSON (JavaScript Object Notation) file | |
| json_data = pd.read_json("path/to/file/data.json") | |
| # To read from a HTML (Hypertext Markup Language) file | |
| html_data = pd.read_html("path/to/file/data.html") |