In [1]:
import numpy
In [2]:
numpy.sqrt(9)
Out[2]:
In [3]:
log(10)
In [4]:
numpy.log(10)
Out[4]:
In [5]:
import numpy as np
In [6]:
np.log(25)
Out[6]:
To install a library use the following command in CMD: pip install numpy
In [7]:
import pandas_datareader as web
In [8]:
data = web.DataReader('IBM','google')
In [9]:
data.head(10)
Out[9]:
In [10]:
my_stocks = ['IBM','DIS','AMZN']
In [11]:
for i in range(3):
print(my_stocks[i])
In [13]:
for i in range(len(my_stocks)):
data = web.DataReader(my_stocks[i],"google")
print(data.head(5))
In [14]:
data.head()
Out[14]:
In [15]:
data["Open"]
Out[15]:
In [16]:
data["Open"].head()
Out[16]:
In [17]:
data["Open"].describe()
Out[17]:
In [18]:
data.describe()
Out[18]:
In [19]:
import matplotlib.pyplot as plt
In [21]:
plt.plot(data["Open"])
plt.plot(data['High'])
plt.show()
In [ ]: