[DB-SIG] numbers with correct decimals places

Edilson Santos edilson.floriano at gmail.com
Wed Apr 27 09:14:39 EDT 2016


Hi,
I'm using a Michael Halls-Moore's source code, posted on
https://www.quantstart.com/articles/Forecasting-Financial-Time-Series-Part-1
The original code import the Yahoo's data, using a user-defined function.
This function imports the data set with the correct number of decimal
places.
I've made a modification to import *.csv files, eliminating the function
definition.
The problem is that imported file comes with only two decimal places, even
if the original file (*.csv) presents six decimal places.
How can I get a DataFrame with correct decimal places?

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#Location=r'C:\Users\...\XXXX.csv'
Location = r'C:\Users\.....\XXXX.csv'
#Access Data set
ts =
pd.DataFrame.from_csv(Location,header=0,sep=',',index_col=1,parse_dates=True,
      encoding=None,tupleize_cols=False,infer_datetime_format=False)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Best Regards

Edilson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/db-sig/attachments/20160427/e6cc3989/attachment.html>


More information about the DB-SIG mailing list