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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -