def close_spider(self, _spider):
        """
        Write out to file
        """
        self.df['date_download'] = pd.to_datetime(
            self.df['date_download'], errors='coerce', infer_datetime_format=True
        )
        self.df['date_modify'] = pd.to_datetime(
            self.df['date_modify'], errors='coerce', infer_datetime_format=True
        )
        self.df['date_publish'] = pd.to_datetime(
            self.df['date_publish'], errors='coerce', infer_datetime_format=True
        )
        self.df.to_pickle(self.full_path)
        self.log.info("Wrote to Pandas to %s", self.full_path)
def close_spider ( self , _spider ) : self . df [ 'date_download' ] = pd . to_datetime ( self . df [ 'date_download' ] , errors = 'coerce' , infer_datetime_format = True ) self . df [ 'date_modify' ] = pd . to_datetime ( self . df [ 'date_modify' ] , errors = 'coerce' , infer_datetime_format = True ) self . df [ 'date_publish' ] = pd . to_datetime ( self . df [ 'date_publish' ] , errors = 'coerce' , infer_datetime_format = True ) self . df . to_pickle ( self . full_path ) self . log . info ( "Wrote to Pandas to %s" , self . full_path )
Write out to file