I have a dataframe say df, which has 900 columns.
when I do df.to_parquet()
it gives key error. You may go through the error below.Just to tell you all "df.to_pickle"
works fine in my code
As a work around when I do:
"df.astype(str);"
which converts all column into string and therefore "df.to_parquet"
becomes successful
But but... I do not want to convert all columns into 'str'. I just want to know what all columns specifically are causing issue. So that's my major concern. Hope you all understand my question now.
KeyError
Traceback (most recent call last)
~/.conda/envs/py3/lib/python3.6/site-packages/pyarrow/pandas_compat.py in get_logical_type(arrow_type)
68 try:
---> 69 return logical_type_map[arrow_type.id]
70 except KeyError:
NotImplementedError: struct<>