python - Filtering data that is 'water falled' in a spread sheet -
i working data "water falled" (in excel) becomes normal after number of lines in excel.
essentially need script remove empty data rows , keep full rows, location of rows data full variable, , not experienced python not quite sure how filter out "waterfall" rows.
i attached simple example of mean, row 10 script need start keeping rows: excel example
what have written, assuming .py script in same folder data needs filtered, along folder 'archive' , 'downsampled'.
folders = os.listdir('./') folder in folders: filename = folder f = open(filename,'r') lines = f.readlines() f.close() shutil.move(folder, './archive') f_out = open('./downsampled/' + folder + '.csv', 'w') #filter data. f_out.close()
i ended using pandas dropna() feature. thank you.
Comments
Post a Comment