Skip to content

2. Loading Data

Ruben edited this page Mar 3, 2018 · 1 revision

Technify accepts any json structure and does it best to convert it to a Pandas dataset:

data = [{'date': datetime.datetime(2018, 2, 19, 0, 0), 'o': 90.0, 'h': 90.800003, 'l': 89.480003, 
         'c': 90.360001, 'adjc': 90.360001, 'v': 230265, 'ticker': 'HO.PA'}]

thales = Stock(data)

which prints

>> Stock - available cols:['adjc', 'c', 'date', 'h', 'l', 'o', 'ticker', 'v']

It is also possible to retrieve the data directly from Quandl given its ticker:

from technify import Stock

bitusd = Stock.fromQuandl("BCHARTS/KRAKENUSD")

Once the data is loaded, a console message shows the available columns:

>> BCHARTS/KRAKENUSD - available cols:['Open', 'High', 'Low', 'Close', 'Volume (BTC)', 'Volume (Currency)', 'Weighted Price']

All the data is stored inside a inner Pandas dataframe which can be access just by doing:

print (bitusd.data)

Clone this wiki locally