split excel sheet for every nrows using python -


i have excel file more 1 million rows. need split every n rows , save in new file. new python. help, appreciated , needed

as suggested ohauth can save excel document csv file. start begin processing of data.

processing data can use python csv library. not require installation since comes python automatically.

if want more "powerful" might want pandas. however, requires installation of module.

if not want use csv module of python nor pandas module because not want read docs, like.

f = open("mycsvfile", "r") row in f:     singlerow = row.split(",") #replace "," delimiter chose seperate columns     print singlerow     > [value1, value2, value3, ...] #it returns list , list comprehension documented , easy understand, thus, further processing wont difficult 

however, recommend looking moduls since handle csv data better, more efficient , on 'the long shot' save time , trouble.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -