Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Exporting data to csv

Hello,

I'm trying to export data in .csv with the following code:

import numpy as np  
import pandas as pd

#starting parameters  
end_db = "2016-02-01"  
#get symbols and export to csv  
aapl = get_pricing(symbols('AAPL'), "2002-01-01", end_db, frequency="daily", fields="close_price")  
aapl.to_csv('C:\aapl.csv')  

I'm continuously receiving an InputRejected error. I didn't find many examples on tutorial and don't understand what is missing in the sintax.
Any help please?

Thanks.

6 responses

I am pretty sure these sorts of functions are blocked, they do not allow data to be exported.

Why do you need to export data? Is there something you can't do in the Q research platform?

I'm still learning. My experience in python is very poor at the moment and I want to export data for matching (in excel) the results I'm calculating through Research platform. That's all.

Im trying to do something similar and export my results of over 600 stock and am unable to....is exporting values blocked?????

Yes.

I would like to export data from a backtest for my own analysis on my algorithm's performance. For example: I would like basic summary statistics or look at performance weekly rather than quarterly. These features would be great for the backtest results window.

Is there some kind of workaround in a notebook?