Skip to content

Instantly share code, notes, and snippets.

View jordantwells42's full-sized avatar

Jordan Wells jordantwells42

View GitHub Profile
@jordantwells42
jordantwells42 / Markdium-python.py
Created August 21, 2020 22:27
Markdium-A Guide to Serving Up Matplotlib Visualizations Two Ways
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
@jordantwells42
jordantwells42 / Markdium-python.py
Created August 21, 2020 22:27
Markdium-A Guide to Serving Up Matplotlib Visualizations Two Ways
python -m pip install -U matplotlib
pip install numpy
@jordantwells42
jordantwells42 / Markdium-python.py
Created August 21, 2020 22:27
Markdium-A Guide to Serving Up Matplotlib Visualizations Two Ways
import numpy as np
import matplotlib.pylot as plt
@jordantwells42
jordantwells42 / Markdium-python.py
Created August 21, 2020 22:27
Markdium-A Guide to Serving Up Matplotlib Visualizations Two Ways
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)
@jordantwells42
jordantwells42 / Markdium-python.py
Created August 21, 2020 22:25
Markdium-A Practical Guide to Pandas
# 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")
@jordantwells42
jordantwells42 / Markdium-python.py
Created August 21, 2020 22:25
Markdium-A Practical Guide to Pandas
pip install numpy
pip install pandas
@jordantwells42
jordantwells42 / Markdium-python.py
Created August 21, 2020 22:25
Markdium-A Practical Guide to Pandas
import numpy as np
import pandas as pd
@jordantwells42
jordantwells42 / Markdium-python.py
Last active August 17, 2020 01:53
Markdium-A Practical Guide to Pandas
pip install numpy
pip install pandas
@jordantwells42
jordantwells42 / Markdium-python.py
Last active August 17, 2020 01:53
Markdium-A Practical Guide to Pandas
import numpy as np
import pandas as pd
@jordantwells42
jordantwells42 / Markdium-python.py
Last active August 17, 2020 01:53
Markdium-A Practical Guide to Pandas
# 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")