On 27.04.2016 15:14, Edilson Santos wrote: > 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?
This SIG is about relational databases, so I think you'd be better off asking in a pandas related forum for help. Something you might want to try is use the stdlib csv module for the import and then pass the resulting list to pandas. > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > #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 > > > > _______________________________________________ > DB-SIG maillist - DB-SIG@python.org > https://mail.python.org/mailman/listinfo/db-sig > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Apr 28 2016) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> Python Database Interfaces ... http://products.egenix.com/ >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ http://www.malemburg.com/ _______________________________________________ DB-SIG maillist - DB-SIG@python.org https://mail.python.org/mailman/listinfo/db-sig