#NEWLINE# def appends( ) : #NEWLINE# #INDENT# filename = 'c:/day/bigfile.csv' #NEWLINE# for code in [ '000875' , '600848' , '000981' ] : #NEWLINE# #INDENT# df = ts . get_hist_data ( code ) #NEWLINE# if os . path . exists ( filename ) : #NEWLINE# #INDENT# df . to_csv ( df , mode = 'a' , header = None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# df . to_csv ( filename )