i am using the python tile in domo magic etl
i am trying to cast a column to a category
but when i try and read the dataframe to the write_dataframe i get an error
# Import the domomagic package into the script
from domomagic import *
# read data from inputs into a data frame
raw = read_dataframe('Source 2')
#print('Before Cast')
#print(raw.dtypes)
#cast to correct dtypes to save space
raw = raw.astype({'VEEVA Entity ID': 'category'}, errors='raise')
print(type(raw))
write_dataframe(raw)
The error i get is has anyone else had a similar issue. it seems like domo specific outside of domo in pure python the code works.
Traceback (most recent call last):
00:00:10.604 File "<stdin>", line 25, in <module>
00:00:10.606 File "/home/domo/domomagic/io.py", line 46, in write_dataframe
00:00:10.606 write_array_dict(d)
00:00:10.606 File "/home/domo/domomagic/io.py", line 59, in write_array_dict
00:00:10.606 raise ValueError('domomagic: Array dict values must be numpy.ndarrays')
00:00:10.606 ValueError: domomagic: Array dict values must be numpy.ndarrays