Python software development (CSV to Pandas to SQL or CSV to SQL to Pandas) -


i have multiple csv files want manipulate(calculate mean, sum, etc.) , after want store them in sqlite database.

but want know proper way that.

csv sql , manipulate pandas

or

csv, manipulate pandas , store in sql

for example, want store data in table http://financials.morningstar.com/ratios/r.html?t=goog&region=usa&culture=en-us. update yearly , add 2013,2014,etc. in sql table. i'll create column have 10 year average each rows, etc.

regards,

right now, pandas's support manipulating csv files far beyond of ability manipulate sql databases, though there significant effort right improve latter leaps , bounds!

take @ the read_csv docs. 1 of flexible, fast, , powerful text file readers/writers out there data analysis applications.

on other hand read_sql can write sqlite databases , doesn't store index.

with read_csv can read multiindex objects (hierarchical indexes)!

if aren't tied database, recommend using pandas hdf5 persistence. use time , works great.

in summary, recommend first choice listed if must use database since writing database not going work unless you're using sqlite, can read others besides sqlite.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -