×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Matteo Lavina
Added: Aug 2, 2021 5:05 AM
Modified: Aug 2, 2021 5:05 AM
Views: 3656
Tags: no tags
  1.                 if os.path.getsize(os.path.join(path_temp, table + '.csv')):
  2.                     self.logger.debug(f'File {table + ".csv"} exists')
  3.                     data.to_csv(os.path.join(path_temp, table + '.csv'), index=False, mode='a')
  4.                 else:
  5.                     self.logger.debug(f'File {table + ".csv"} not exists')
  6.                     data.to_csv(os.path.join(path_temp, table + '.csv'), index=False)