Created
August 1, 2023 14:46
-
-
Save ChicagoDev/2074050e94a87e2171572b3c6ae585e8 to your computer and use it in GitHub Desktop.
This file contains 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
# Reading a CSV and creating a chart | |
import pandas as pd | |
import matplotlib.pyplot as plt # Provides us functions to create the visuals | |
# EOD Pricing for 12 instruments | |
data = pd.read_csv('/content/tr_eikon_eod_data.csv', #File location | |
index_col=0, # First column treated as an index | |
parse_dates=True) # Indicies are Dates | |
plt.plot(data['AAPL.O']) | |
plt.ylabel('Price $') | |
plt.xlabel('Year') | |
plt.title('Apple Stock Price') | |
# Stle String Samples | |
plt.plot(y.cumsum(), 'b', lw=1.5) # Plots the data as the line in blue with line width of 1.5 | |
plt.plot(y.cumsum(), 'ro') # See API for details of format strings: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment