I use to_stata() to exporting my DataFrame
AppliedTariff.to_stata('Applied%s.dta' % name, write_index = False)
raise ValueError('Writing general object arrays is not supported')
I do not know how to continue.
I use to_stata() to exporting my DataFrame
AppliedTariff.to_stata('Applied%s.dta' % name, write_index = False)
raise ValueError('Writing general object arrays is not supported')
I do not know how to continue.
See the answer via this link.
Find out which columns are of the object type:
list(df.select_dtypes(include=['object']).columns)
Convert them to something else: df['col'] = df['col'].astype(str)