Class03 Answer:

Create a NumPy Array From Pandas DataFrame of GSPC prices.

This is easy.


# class03np11.py

# Create a NumPy Array From Pandas DataFrame of GSPC prices.

import pandas as pd
import numpy  as np

prices_df = pd.read_csv('http://tkrprice.herokuapp.com/static/gspc.csv')
prices_a  = np.array(prices_df)

# I should print the first 9 rows to help me see the NumPy Array:
print(prices_a[:9])

'bye'

Class03 Lab


ml4.us About Blog Contact Class01 Class02 Class03 Class04 Class05 Class06 Class07 Class08 Class09 Class10 dan101 Forum Google Hangout Vboxen