writing pandas DataFrame might fail

Issue #50 resolved
Albert-Jan Roskam repo owner created an issue

In SavWwriter.writerows

        elif pandasOK and isinstance(records, pd.DataFrame):
            records[records.isnull()] = self.sysmis
            for record in records.itertuples(index=False):
                self.writerow(list(record))

the line records[records.isnull()] = self.sysmis should probably be replaced with records = records.fillna(self.sysmis). This is needed when the DataFrame contains chars.

Comments (1)

  1. Log in to comment