Reputation: 153
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.
Upvotes: 5
Views: 3436
Reputation: 2735
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)
Upvotes: 3