diff --git a/SOAP2ArchiveCSV.py b/SOAP2ArchiveCSV.py index 246c05b..d9e3a6f 100755 --- a/SOAP2ArchiveCSV.py +++ b/SOAP2ArchiveCSV.py @@ -62,7 +62,7 @@ args = parser.parse_args() -df = pd.read_csv(args.infile,sep=';',index_col=False,dtype=object,error_bad_lines=False) +df = pd.read_csv(args.infile,sep=';',index_col=False,dtype=object,on_bad_lines='skip') if not args.archive_year: year = str(datetime.datetime.now().year) @@ -137,4 +137,4 @@ bd_thinned['hhmm'] = bd_thinned.apply(lambda row: str(pd.to_datetime(row['locationDate']).hour).zfill(2)+str(pd.to_datetime(row['locationDate']).minute).zfill(2), axis=1) out_columns=['platformId','latitude','longitude','year','doy','hhmm','value'] + ['locationClass'] bd_thinned[out_columns].dropna().to_csv(k + '.y' + year,' ',header=False,index=False,na_rep=np.nan,mode='a') - \ No newline at end of file +